Yup, works now thanks!
for(property in obj){
//this is the has own property.. It should (if I'm correct) filter out properties that are inherited.
if(!obj.hasOwnProperty(property)){
continue;
}
//logic to handle the property that is actually a real property, not inherited
}
var x = Object; //Possibly wrong way.. but works.
x.prototype.test1 = function(){console.log('test1 WAS CALLED')};
var y = new x;
y.dustin = 1;
y.test1();
for(prop in y){
var currProp = y[prop];
if(!y.hasOwnProperty(prop)){
continue;
}
console.log('HAS:' + prop);
}
console.log('y OBJECT');
console.log(y);
console.log('x OBJECT')
console.dir(x);
test1 WAS CALLED
HAS:dustin
y OBJECT
{ dustin: 1 }
x OBJECT
[Function: Object]
test1 WAS CALLED
HAS:dustin
HAS:test1
y OBJECT
{ dustin: 1 }
x OBJECT
[Function: Object]