Handshake interview question

JS core questions and small coding task.