daytonn
2/19/2015 - 7:26 PM

CWCPOOJS - object with methods

CWCPOOJS - object with methods

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 + ".")
  }
};