3 ms·
Your own example is more concisely covered by arrows, which are already available: class Vector { constructor(x=0, y=0, z=0) { this.x = x; th
by erydo 10y ago
Your own example is more concisely covered by arrows, which are already available:
class Vector {
constructor(x=0, y=0, z=0) {
this.x = x;
this.y = y;
this.z = z;
setTimeout(() => console.log(this.x + ", " + this.y + ", " + this.z), 10);
}
}