I don't understand why the code below returns seemingly wrong values (150 instead of 100):
var price = {
33427009000001024: 100,
33427009000001025: 150,
33427010000001026: 200
};
alert(price[33427009000001024] + "," + price["33427009000001024"]);
Displayed values: 150,150
I fixed it by enclosing object properties in quotes:
var price = {
"33427009000001024": 100,
"33427009000001025": 150,
"33427010000001026": 200
};
But I don't understand if quotes are really needed/required, and why I don't get an error but just wrong values?