var heroes = ["Superman", "Thor", "Batman", "Mujer Maravilla"];
for( var i = 0; i < heroes.length; i++) {
alert(heroes[i]);
}
var heroes = ["Superman", "Thor", "Batman", "Mujer Maravilla"];
for( var i = 0; i < heroes.length; i++) {
alert(heroes[i]);
}
Super.
Te comparto otra solución al problema.
heroes.forEach(function(elemento) {
alert(elemento);
});