Invalid Array Length Javascript Code Compiler Html