Inditech interview question

Related to react js javascript