Pregunta de entrevista de Bajaj Finserv Health

Question was purely based on javascript and reactjs