By dot operator you can get access to values from keys which not contains either space's or special characters, words starting from number( that is, those that can't be used as eg variable names) otherwise you can get any reffering to them like as keys in associative array.
You can use as key as everything you want but remember the key will be a string representation of what you put in. Clarifying - will be called toString().
Look:
var myObj = {};
myObj[ 3 ] = "key is 3";
alert( myObj[ "3" ] ); //alerts "key is 3" because (3).toString() is "3"
//but an error will thrown when accessing by myObj.3
myObj[ {} ] = "key is {}"
alert( myObj["[object Object]"] ) // alerts "key is {}" because ({}).toString() is "[object Object]"
You can override toString()
method , eg:
Object.prototype.toString = function(){ return "object"}
a = {};
a[ {} ] = "whatever";
alert( a["object"] ); // alerts "whatever" because as now toString() returns "object" from each created object