Tengo una pregunta sobre esta clase en JavaScript. Soy un novato en JavaScript, ya que normalmente estamos usando new para new object of class, pero veo aquí que usan var .
Por ejemplo, de Eloquent Javascript:
var Level = class Level { constructor(plan) { let rows = plan.trim().split("\n").map(l => [...l]); this.height = rows.length; this.width = rows[0].length; this.startActors = []; this.rows = rows.map((row, y) => { return row.map((ch, x) => { let type = levelChars[ch]; if (typeof type == "string") return type; this.startActors.push( type.create(new Vec(x, y), ch)); return "empty"; }); }); } }