ES6 obiekty

//definicja klasy
class car{
    //konstruktor
    constructor(brand, model){
        this.brand = brand;
        this.model = model;
    }
    //inna metoda
    go = function(){
        console.log("works");
    }
}

//wywołanie
var auto = new car("opel", "corsa");
auto.go();