Correct em dash in OOP challenge plus formatting

pull/13315/head
Eric Leung 2017-02-13 02:43:20 -08:00
parent 8964f19460
commit b0236a163a
1 changed files with 2 additions and 2 deletions

View File

@ -724,11 +724,11 @@
"title": "Set the Child's Prototype to an Instance of the Parent",
"description": [
"In the previous challenge you saw the first step for inheriting behavior from the <code>supertype</code> (or parent) <code>Animal</code>: making a new instance of <code>Animal</code>.",
"This challenge covers the next step: set the <code>prototype</code> of the <code>subtype</code> (or child) -- in this case, <code>Bird</code> -- to be an instance of <code>Animal</code>.",
"This challenge covers the next step: set the <code>prototype</code> of the <code>subtype</code> (or child)&mdash;in this case, <code>Bird</code>&mdash;to be an instance of <code>Animal</code>.",
"<blockquote>Bird.prototype = Object.create(Animal.prototype);</blockquote>",
"Remember that the <code>prototype</code> is like the \"recipe\" for creating an object. In a way, the recipe for <code>Bird</code> now includes all the key \"ingredients\" from <code>Animal</code>.",
"<blockquote>let duck = new Bird(\"Donald\");<br>duck.eat(); // prints \"nom nom nom\"</blockquote>",
"<code>duck</code> inherits all of <code>Animal's</code> properties, including the <code>eat</code> method.",
"<code>duck</code> inherits all of <code>Animal</code>'s properties, including the <code>eat</code> method.",
"<hr>",
"Modify the code so that instances of <code>Dog</code> inherit from <code>Animal</code>."
],