Merge pull request #13315 from erictleung/fix/use-em-dash-in-oop

Correct em dash in OOP challenge plus formatting
pull/13321/head
mrugesh mohapatra 2017-02-13 17:39:34 +05:30 committed by GitHub
commit d4f85d0bc6
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>."
],