I stole this from here. I can't find my previous blog post on this topic.
var obj = {
name: "Simon",
age: "20",
clothing: {
style: "simple",
hipster: false
}
}
for(var propt in obj){
alert(propt + ': ' + obj[propt]);
}
No comments:
Post a Comment