Make Instances of Objects with a Constructor Functio

Make Instances of Objects with a Constructor Functio
0

#1

Tell us what’s happening:*

Your code so far

var Car = function() {
  this.wheels = 4;
  this.engines = 1;
  this.seats = 5;
};

// Only change code below this line.
myCar.wheels="4";
var myCar;

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:


#2

//I n the editor, use the Car constructor to create a new instance and assign it to myCar.
var myCar = new Car();

// Then give myCar a nickname property with a string value.
myCar.nickname = “chooseyournickname”;