Let\'s say I have
myArray = [\'item1\', \'item2\']
I tried
for (var item in myArray) {console.log(item)}
It
You can use Array.forEach
var myArray = ['1','2',3,4] myArray.forEach(function(value){ console.log(value); });
Use the built-in Javascript function called map. .map() will do the exact thing you're looking for!