4/17 Keeps freezing when submit


#1

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

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

Everytime I submit this it freezes and crashes the tab.

What am I doing wrong?


#2

I forgot the var i = 0. opps


#3

i think this is wrong:not i=+1 but i+=1


#4

use this code:
var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
for (var i = 0; i < languages.length; i++) {
console.log(i)
console.log('CSS')
console.log('HTML')
console.log('JavaScript)
console.log('Python')
console.log('Ruby')
}


#5

this is the right code;
var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
for (var i = 0; i < languages.length; i++){
console.log(languages[i]);
}


#6

You need to change =+ to ++.


#7

Para este tópico, tente essa solução, pois ela funciona!
var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];

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