Created
September 5, 2016 19:39
-
-
Save aredridel/2d011ea7a602816af5e3338e84fb7b6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src=t1.js></script> | |
<script src=t2.js></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("help me"); | |
function Character(name){ | |
this.name = name; | |
// this.id = createCharacterId(); | |
console.log("obi-wan kenobi"); | |
}; | |
Character.prototype.printName = function(){ console.log("Hi, I'm " + this.name) } | |
Character.prototype.printList = function(){ console.log(this.recipeList) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("you're my"); | |
function CookingCharacter(name, recipeList){ | |
Character.call(this, name); | |
this.recipeList = recipeList; | |
} | |
CookingCharacter.prototype = Object.create(Character.prototype); | |
console.log("only hope"); | |
var cook = new CookingCharacter("JP", ["apples"]); | |
cook.printName(); | |
cook.printList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment