Maybe you can think about removing the attribute to a function. I mean something like this:
var obj = { key1: "it ", key2: function() { return this.key1 + " works!"; } }; alert(obj.key2());
2.1m questions
2.1m answers
60 comments
57.0k users