McAfee interview question

JS related questions, some coding