Expected ;


#1

var names = ["john", "Ryan" , "Bill" , "mike" , " joey"]:
for (var i = 4; i < 0; i ++) {
console.log("I know someone called " + names[i]);
}
says expected ; don't know why


#2

Simple typo, hard to see.
it says expected ; (semicolon) because that's the way you end a sentence in programming. You have a colon there.


#3

// Click on "Stuck? Get a hint!" if you get stuck!
var names = ["john", "Ryan" , "Bill" , "mike" , "joey"];
for (var i = 4; i < 0; i ++) {
console.log("I know someone called " + names[i]);
}
now it says this :Oops, try again. Your code should have printed 'I know someone called john', but didn't. Make sure to type the 'I know someone called ' part exactly right, and don't forget the space between that phrase and the name!


#4

Well you start with i=4 and then compare if i<0 obviously 4<0 is false so nothing is printed. Also if you have 5 names it sould be <5 (0,1,2,3,4) :smile:


#5

thanks for the help
:video_game:hvgvfytcytyut