0

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);
AS Mackay
  • 2,831
  • 9
  • 19
  • 25
  • Possible duplicate of [How to set the jslint ES6 directive in Brackets?](https://stackoverflow.com/questions/44686144/how-to-set-the-jslint-es6-directive-in-brackets) – Karthikeyan Jan 06 '19 at 07:03
  • Check this https://stackoverflow.com/questions/44686144/how-to-set-the-jslint-es6-directive-in-brackets. – Karthikeyan Jan 06 '19 at 07:03

0 Answers0