Why am I getting the error message: "Line[i] is undefined" in the following code? It might be something trivial, but I just can't fix it.
It works, for example, if I use Line[0] or Line[1], etc.
But I need to iterate through the loop.
var Line = [{ Func: "Function"}];
for (i = 0; i <= 15; i++) {
Line[i].Func = "Function" + I;
}
Lineis one element array[0 => {Func:...}]soLine[1]is undefined, thereforeLine[1].Funcis undefined