Something
public text v1 · immutablevar testFor = function(obj) {
for (var i in obj) {
alert(typeof obj[i]);
}
};
var testEach = function(obj) {
$.each(obj, function(i) {
alert(typeof this);
});
};
data = {
test: false
};
testFor(data); // alerts "boolean"
testEach(data); // alerts "object"