Infosys interview question

Javascript related question, little bit of coding