From d44228554582d758b858134acc994429f5a277e8 Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Mon, 20 Feb 2017 18:41:54 +0100 Subject: [PATCH] fix(challenge): Format constructor property in "OOP: Set Constructor" --- .../object-oriented-programming.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 629d628b54c..688f02304ce 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 @@ -507,12 +507,12 @@ "id": "587d7daf367417b2b2512b80", "title": "Remember to Set the Constructor Property when Changing the Prototype", "description": [ - "There is one crucial side effect of manually setting the prototype to a new object. It erased the constructor property! The code in the previous challenge would print the following for duck:", + "There is one crucial side effect of manually setting the prototype to a new object. It erased the constructor property! The code in the previous challenge would print the following for duck:", "
console.log(duck.constructor)
// prints ‘undefined’ - Oops!
", - "To fix this, whenever a prototype is manually set to a new object, remember to define the constructor property:", + "To fix this, whenever a prototype is manually set to a new object, remember to define the constructor property:", "
Bird.prototype = {
  constructor: Bird, // define the constructor property
  numLegs: 2,
  eat: function() {
    console.log(\"nom nom nom\");
  },
  describe: function() {
    console.log(\"My name is \" + this.name);
  }
};
", "
", - "Define the constructor property on the Dog prototype." + "Define the constructor property on the Dog prototype." ], "challengeSeed": [ "function Dog(name) {",