freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

Hard coded values pass for Waypoint: Make Unique Objects by Passing Parameters to our Constructor

Open sludge256 opened this issue 10 years ago • 1 comments

http://www.freecodecamp.com/challenges/waypoint-make-unique-objects-by-passing-parameters-to-our-constructor

Was helping someone out with this waypoint and they were able pass without passing the parameters to the object attributes. I tested it out and was able to pass with:

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

//Try it out here
var myCar = new Car(5,5,5);

// Only change code above this line

(function() {return JSON.stringify(myCar);})();

sludge256 avatar Dec 13 '15 03:12 sludge256

I will try to work on this one

yjcxy12 avatar Dec 13 '15 15:12 yjcxy12