Menu
Is there any simple way of getting a objects type.
using the sample below I would like to determine its a “Person’ object.
Is this possible without parsing through the .constructor property?
[code=php]
//Obj definition
function Person()
{
this.name;
this.age;
}
//create new
var p = new Person();
p.name = “Drew”;
p.age = 25;
//get Obj type??
alert(p.constructor);
Thanks,
Drew