McAfee Interview Question

JS related questions, some coding