How can I get the name of an object as a string in javascript, particulary processing.js, but plain vanilla js is fine if that is what you know best. Take this object:
var obj = {
w: 200,
h: 300
};
and somehow make a function that returns its name:
var nameOfObj = function(obj){
return *what should go here?*
};
so finally i can call this and get the name of my object, obj, as a string: "obj" help is much appreciated, thanks!