BNY interview question

Arrays, data structures, Javascript, code in Javascript