Expert Refresh

Object


var obj = { name: "Pete", age: 15 }; for(key in obj) { alert("key is "+[key]+", value is "+obj[key]); } OR jQuery.each(obj, function(key, value) { console.log("key", key, "value", value); });


References



n/a