Infosys interview question

Basic questions in JavaScript and React