Iterating over an array (what's wrong with this)


#1

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
var result = "";
for (var i = 1; i <languages.length; i++){
    result += languages[i]+" ";
   
}
console.log(result);

It keeps saying it did not log "HTML" to the console ????


#2

Try this

console.log(languages[i]);

Inside your for loop.


#3

Not sure you can just add strings together in javascript. There should be some kinda method for it