Menu
hey,
I’m writing some oo code and am wondering if there is a way to get an objects variable name, ie,
function someobj(id){
this.id=id;
this.displayId = displayId;
return this;
}
function displayId(){
with(this);
<—- I would like to be able to get the variable that the object is stored in (ie objX)—->
}
var objX = new someobj(‘0909’);
Thanks in advance
Carl