var person = { name: "Fred", sayName: function() { console.log(this.name); } }; person.sayName();
var obj = { func: function(a, b) { return a * b; } }; obj.func(3, 6); // 18