I am trying to call an object method from a property definition of an object (of the same object) to no avail.
var objectName = { method : function() { return "boop"; }, property : this.method() };
In this example, I want to assign the return value of objectName.method ("boop") to the object Name.property.
I tried objectName.method() , method() , window.objectName.method() , along with options for noting the brackets of all of these, for example. this["method"] , with no luck.
source share