You can’t set arr[0] because it doesn’t exist. (same for the next three lines)
Use arr.append(1) or one of the other methods to add something to an array.
Thanks. I suppose I could do something like var arr = range(4), but then I would get values in my array. Is there a short way to initialize my array with 4 null values?
hidemat | 2019-10-24 01:12
Sure just declare it like this: var arr = [null, null, null, null]