Make Unique Objects by Passing Parameters to our Constructor(solved)

Make Unique Objects by Passing Parameters to our Constructor(solved)
0.0 0

#1

I had problem with this but I finally got the solution:

var Car = function(wheels, seats, engines) {
this.wheels = wheels;
this.seats = seats;
this.engines = engines;
};

//Try it out here
var myCar = new function(wheels, seats, engines){
this.wheels = 4;
this.seats = 5;
this.engines = 1;
};


#2

I forgot to call it afterwards at the bottom with this:

var myCar = new Car(4, 5, 1);


#3

Here is the code I used:

var Car = function(wheels, seats, engines) {
//Change this constructor
this.wheels = wheels;
this.seats = seats;
this.engines = engines;
};

//Try it out here
var myCar = new Car (3, 1, 2);