From 9b438e81485a6f7509c2e569505c3bc567f612cd Mon Sep 17 00:00:00 2001 From: padulam Date: Sun, 29 Jan 2017 15:20:21 -0500 Subject: [PATCH] Update instructions for change the prototype challenge --- .../object-oriented-programming.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json b/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json index a1ff7a9cf5..6e96a6fb59 100644 --- a/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json +++ b/seed/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json @@ -648,7 +648,7 @@ "This becomes tedious after more than a few properties.", "
Bird.prototype.eat = function() {
  console.log(\"nom nom nom\");
}

Bird.prototype.describe = function() {
  console.log(\"My name is \" + this.name);
}
", "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);
  }
};
", + "
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." ],