All right thanks for the example.
I noticed that in JavaScript, we must use the keyword this
to refer an attribute inside a class that’s why you say (in your example) :
const { p, c } = this;
but it’s not efficient at all isn’t it? It means that at each method call, you are going to create a variable.
In the same time, saying :
this.p.ellipse(...);
this.p.random();
this.p.fill();
// ...
is quite heavy when writing