1. Arrays 
2. HTML communicate with P5.js

during doing the quiz 5 Challenge "erase the balls when the encounter from each other", I realize that I couldn't make it work. 
The problem is the line of for ( b of Balls )  cannot be write as for ( b in Balls ).
and for b2 is in for b loops:
 for ( b of balls ){;
    for (b2 of balls){
  if (b.isNear(b2.x,b2.y) && b !== b2){
         balls.splice(b, 1); 
         balls.splice(b2, 1); 

I cleared up the code of last week's hw. the "fall balls"
Back to Top