How can I obtain the name of the object I passed to a function, inside that function ?
var referencedObject = {
someProperty : 'string'
};
var functionObject = {
construct: function(reference){
console.log(reference.toString());
}
};
functionObject.construct(referencedObject);
I'm Looking for referencedObject
as an output by the console.log();
Currently is giving me [object object]