Infosys interview question

javascript basics