SyntaxFix
Write A Post
Hire A Developer
Questions
You can also reference the obj once you are inside the function instead of this.
obj
this
var obj = { key1: "it", key2: function(){return obj.key1 + " works!"} }; alert(obj.key2());