Invalid Array Length Javascript Code Compiler