Printing the y coordinate is "undefined"

The above the picture of my code, where it isn’t printing the y coordinate of the moving rectangles, instead it is printing “undefined”

1 Like

Did you init the values ? In a for loop?

https://editor.p5js.org/Nis_Collect/sketches/U0p3GjOK1

You can check my code from the above link and compare to the picture which I had uploaded before, please…

For context this topic continues from here:

Resources for programming with P5,js:

:)