diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index 151c64d933..77b0596a96 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -69,9 +69,9 @@ "Have your MotorBike constructor describe an object with wheels, engines and seats properties and set them to numbers." ], "tests":[ - "assert(typeof (new MotorBike()).engines === 'number', 'message: myMotorBike should have a engines attribute set to a number.');", - "assert(typeof (new MotorBike()).wheels === 'number', 'message: myMotorBike should have a wheels attribute set to a number.');", - "assert(typeof (new MotorBike()).seats === 'number', 'message: myMotorBike should have a seats attribute set to a number.');" + "assert(typeof (new MotorBike()).engines === 'number', 'message: MotorBike should have a engines attribute set to a number.');", + "assert(typeof (new MotorBike()).wheels === 'number', 'message: MotorBike should have a wheels attribute set to a number.');", + "assert(typeof (new MotorBike()).seats === 'number', 'message: MotorBike should have a seats attribute set to a number.');" ], "challengeSeed":[ "var Car = function() {", @@ -80,8 +80,6 @@ " this.seats = 1;", "};", "", - "var myCar = new Car();", - "", "// Only change code below this line.", "", "var MotorBike = function() {", @@ -91,8 +89,7 @@ "};" ], "tail":[ - "var myMotorBike = new MotorBike();", - "(function() {return JSON.stringify(myMotorBike);})();" + "(function() {return JSON.stringify(new MotorBike());})();" ], "solutions":[ "var Car = function() {\n this.wheels = 4;\n this.engines = 1;\n this.seats = 1;\n};\n\nvar myCar = new Car();\n\nvar MotorBike = function() {\n this.engines = 1;\n this.seats = 1;\n this.wheels = 4;\n};\n\nvar myMotorBike = new MotorBike();"