How to add/push a new object to array upon mouse click in p5.js

Thanks for both the loop and linter! It works really well.

Do you know why using balls.length in the loop doesn’t work?

for ( let i = 0; i<balls.length; i++) b.display();