Last active
December 9, 2017 13:46
-
-
Save rayinla/627ff2e3ba10183a8c1bf110e5a13873 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
var myHouse = { | |
neighborhood: "Cherry Wood", | |
address: "5 Premium Park", | |
city: "Rolly", | |
state: "NC", | |
printInfo(){ | |
// 'this' refers to the object we created. | |
//'this' is easy to conceptualize here because... | |
//we have manually created an object that we can see | |
return this.neighborhood + "," + this.address + "," + this.city + "," + this.state | |
} | |
} | |
myHouse.printInfo() // >> "Cherry Wood,5 Premium Park,Rolly,NC" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment