var Foo = function() {
this.message = "Hi";
}
Foo.prototype = {
say: {
hi: function() {
console.log(this.message);
}
}
}
[edit]I know "this" in hi() refers say, is there any way to achieve this?
var he = new Foo();
he.say.hi(); //"Hi" to console