Pergunta de entrevista da empresa Oracle

In the second step question were related only to JavaScript. It was quite easy. For example looping and retrieving index from function (closure problem and a way to solve it, static closures or block scope in ES6)