Is there a way for me to loop over a Javascript Object\'s built-in properties?
for...in gets me close to where I want to go, but \"A for...in loop does not iterate over
When you say "built in properties", which set of properties are you exactly talking about ?
From Douglas Crockford's 'JavaScript - The Good Parts' :
The for in statement can loop over all of the property names in an object. The enumeration will include all of the properties—including functions and prototype properties that you might not be interested in—so it is necessary to filter out the values you don't want. The most common filters are the hasOwnProperty method and using typeof to exclude functions:
var name; for (name in another_stooge) { if (typeof another_stooge[name] !== 'function') { document.writeln(name + ': ' + another_stooge[name]); } }