Created
December 12, 2016 17:51
-
-
Save Louiefigz/7447617447766da179adcc7e6208b304 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
function Sandwich(bread, ingredients, cut) { | |
this.bread = bread; | |
this.ingredients = ingredients; | |
this.cut = cut; | |
this.serve = function() { | |
console.log("here's your " + this.name + ", enjoy!"); | |
} | |
} | |
var blt = new Sandwich("white", ["bacon","lettuce","tomato","mayo"],"rectangle"); | |
// setting the name of Blt here will allow us to run the following line. | |
blt.name = "BLT"; | |
blt.serve(); // here's your BLT, enjoy! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment