Java Array Within Array Javascript Iterations