TATA ELXSI interview question

Basic js question and node js related