Can only declare a single variable in an enumeration?!


#1

Help! What am I doing wrong here?

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];

for (var i = 0, i < 5; i++) {
console.log (i);
}


#2

you probably want to print languages one by one to console. So you need to fix you for loop.

for (var i = 0; i < 5; i++) {
 console.log(languages[i]);
}

Note the changes. ie: ; instead of ,. And languages[i] instead of just i.