I have a object literal:
var obj = { a : document.getElementById(\"ex1\"), b : obj.a.document.getElementsByTagName(\"div\") };
I am
The modern way to do this is with getter methods:
let obj = { firstName: "A’dab", lastName: "Farooqi" get fullName() { return this.firstName+" "+this.lastName; }, }
So now you can just write obj.fullName - no need for the parentheses on the end.
obj.fullName