Hacker News new | ask | show | jobs
by erydo 3488 days 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);
    }
  }