0

TypeError: undefined is not an object (evaluating 'array[sq] = p+r') at Line: 59

what is hapening? JUST CHECK ONLY PROGRAM ( WHY IS THIS CAP)

27th Oct 2019, 6:54 PM
Bright Lin
Bright Lin - avatar
3 Antworten
0
my program says its not an object, but i made an array containing other arrays. and these arrays contain x and y of all their blocks, (they are rectangle-like shapes made from rectangles).
27th Oct 2019, 6:56 PM
Bright Lin
Bright Lin - avatar
0
yeah, i made a program that make rectangles on a grid
27th Oct 2019, 6:56 PM
Bright Lin
Bright Lin - avatar
0
I believe your problem is you used the length of the array to determine the element. The length of an array is the last index plus one. So use arName.length - 1. Also, you can insert codes and edit your questions
27th Oct 2019, 7:18 PM
Airree
Airree - avatar