Pergunta de entrevista da empresa Infosys

Question on reactjs and javascript