Also JS arrays are called as [] or new Array, you should have got a notice that array() is not a function in the console.... and changing it to an array, you still needed to do a loop, see the above post for the example...