Infosys interview question

Basic Javascript and React JS Questions