freeCodeCamp Challenge Guide: Make Instance of Objects with a Constructor Function

freeCodeCamp Challenge Guide: Make Instance of Objects with a Constructor Function
0

#1

A function that creates objects is called a constructor, my favorite way of creating objects when you have to create more than one of the same object. You can also edit the second object to add more properties if needed. This is called creating instances of an object.

Each new instance of this object inherits all the properties and methods of your original object.

var Car = function() {
   this.wheels = 4;
};

// New instance of Car object.
var myCar = new Car();

//Add the property "engines" to myCar, and make it a number.
myCar.engines = 1;

#2

Please change the link to ‘Get a Hint’ in this challenge, as it is refered to https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-make-instances-of-objects-with-a-constructor-function , which “does not exist or is private”


#3