var tr={}; tr.SomeThing=\'SomeThingElse\'; console.log(tr.SomeThing); // SomeThingElse console.log(tr.Other); // undefined tr.get=function(what){ if (tr.hasOwnP
You could define a getter for your property.