Answers for "loop trough javascript array associative"

1

loop trough javascript array associative

var months = [];
months["jan"] = "January";
months["feb"] = "February";
months["mar"] = "march";

for (var key in months) {
    var value = months[key];
    console.log(key, value);
}
Posted by: Guest on June-14-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language