Schneider Electric interview question

Javascript coding and output questions