My code did work but I need further help.
-
if (distance < this.size + balls[j].size) {
balls[j][‘exists’] = false;
// ---- reduce count -----
count–;
para.textContent =Alive balls: ${count}
;
}
Concerning the count part, why can’t I just put my paragraph content at the end of my code(like I did in my codepen tho I later turned it into comment) instead of having it inside my if statement? -
At EvilCircle constructor, some parameters were given fixed values but when I wanted to create an instance object, I specified the values again(At Bringing the evil circle into the program). Can’t i just omit those parameters?
Modified: I skipped the fixed paramters and it did work. I’d be happy if I could get explanation on why both are correct -
At ** setControls()**, why let _this = this? You can check my answer in my codepen
https://codepen.io/BikkyBlexxy/pen/mdeNROJ
Thanks!