diff --git a/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json b/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json index 1b48605dce..0e76ff0e81 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json +++ b/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json @@ -446,7 +446,7 @@ "A more efficient way is to set the prototype to a new object that already contains the properties. This way, the properties are added all at once:", "
Bird.prototype = {
  numLegs: 2,
  eat: function() {
    console.log(\"nom nom nom\");
  },
  describe: function() {
    console.log(\"My name is \" + this.name);
  }
};
", "
", - "Add three properties numLegs, eat, and describe to the prototype of Dog by setting the prototype to a new object. The properties can be set to any values." + "Add the property numLegs and the two methods eat() and describe() to the prototype of Dog by setting the prototype to a new object." ], "challengeSeed": [ "function Dog(name) {", @@ -461,8 +461,8 @@ "tests": [ "assert((/Dog\\.prototype\\s*?=\\s*?{/).test(code), 'message: Dog.prototype should be set to a new object.');", "assert(Dog.prototype.numLegs !== undefined, 'message: Dog.prototype should have the property numLegs.');", - "assert(Dog.prototype.eat !== undefined, 'message: Dog.prototype should have the property eat.'); ", - "assert(Dog.prototype.describe !== undefined, 'message: Dog.prototype should have the property describe.'); " + "assert(typeof Dog.prototype.eat === 'function', 'message: Dog.prototype should have the method eat().'); ", + "assert(typeof Dog.prototype.describe === 'function', 'message: Dog.prototype should have the method describe().'); " ], "solutions": [], "hints": [],