Created
February 19, 2015 19:26
-
-
Save daytonn/3bc30ec52a74a7690960 to your computer and use it in GitHub Desktop.
CWCPOOJS - object with methods
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 person = { | |
firstName: "Bob", | |
lastName: "Ject", | |
age: 33, | |
address: { | |
street: "123 Memory Ln", | |
apt: "0x7fff9575c05f", | |
zip: "01101", | |
city: "Browser Town", | |
state: "Mozilla" | |
}, | |
sayHello: function() { | |
console.log("Hi, my name is " + this.firstName + ". I live in " + this.address.city + ", on " + this.address.street + ".") | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment