A similar question is asked, but it didn't meet the conditions I've met.
I know that to access a property I can use either point notation or bracket notation. An article at jibbering.com states the same, also this answer. The Specifiacation says the same.
I have this example ( fiddle ) and there is a difference:
var utils = {
myString: "boo",
myNumber: 99,
justNULL: null
};
for (var i in utils) {
document.write ( i + " = " + utils.i + "<br/>" ); //result - undefined
document.write ( i + " = " + utils[i] + "<br/>" );//result - the actual value
}
What I am missing here? Is it something about the usage of the for..in or the definition of the object?