Today I tried to learn classes in JavaScript. The big problem is, that Brackets do not allow to create my objects. Brackets said:
parsing error: The keyword "class" is reserved
Could someone help me?
class Fahrzeug {//Parsing error: The keyword "class" is reserved.
constructor ('Opel', farbe, ps, plaetze, maxGK) {
this.model = model;
this.farbe = farbe;
this.ps = ps;
this.maxGK = maxGK;
this.plaetze = plaetze;
}
}
var Opel = new Fahrzeug();
console.log(Opel);