javascript

Js Hash table – problemi con firebug

06.09.08 | Comment?

Stranamente firebug non logga correttamente un hash.
Sto sbagliando qualcosa?


var _hash = [];
_hash["sala-1"] = "test1";
_hash["sala-2"] = "test2";

//no
console.log(_hash);
//yes
for (var i in _hash) {
    console.log(_hash[i]);
}

Popularity: 1% [?]

Post a Comment

Your email is never shared. Required fields are marked *

*
*
© 2010 Massimiliano Balestrieri | Thanks, WordPress | Sandbox theme | Standards Compliant XHTML & CSS | RSS Posts & Comments