js loop through associative array April 19, 2023April 8, 2023 by wordlinkanswers js loop through associative array Comment 1 var months = [];<br /> months[“jan”] = “January”;<br /> months[“feb”] = “February”;<br /> months[“mar”] = “march”;</p> <p>for (var key in months) {<br /> var value = months[key];<br /> console.log(key, value);<br /> } Popularity 9/10 Helpfulness 9/10 Language javascript Source: Grepper Tags: javascript Share Link to this answer Share Copy Link Contributed on Jun 14 2019 Grepper 0 Answers Avg Quality 2/10