When iterating through an object in JavaScript, you can use the following code:
for(var key in object){
//process object[key]
}
or simply:
for(key in object) {
//process object[key]
}
But is there a difference between the two approaches?