9
連想配列オブジェクトのJavascript foreachループ
for-eachループがJavaScriptの連想配列オブジェクトを繰り返し処理しないのはなぜですか? // defining an array var array = []; // assigning values to corresponding keys array["Main"] = "Main page"; array["Guide"] = "Guide page"; array["Articles"] = "Articles page"; array["Forum"] = "Forum board"; // expected: loop over every item, // yet it logs only "last" assigned value - "Forum" for (var i …
182
javascript
arrays
foreach