Here is an example from a real (not yet working) code:
var a = new Array(); a["www.site.ru"] = "url1"; a["www.site2.ru"] = "url2"; console.log(a); console.log("Длинна массива: "+a.length);
In the Mozilla Firefox console, I see this picture ...
The question is why 0, because there are elements in the array?