Unknown Error


#1



https://www.codecademy.com/en/courses/javascript-beginner-en-NhsaT/2/4?curriculum_id=506324b3a7dffd00020bf661

Oops, try again. Your code should have printed 'I know someone called name1', 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!


// Click on "Stuck? Get a hint!" if you get stuck!
var names = ["name1","name2","name3","name4","name5"];
for ( var i = 0; i < names; i ++) {
    console.log ("I know someone called"  + names[i])
}


#2

@taylorfoster

Look more carefully at the instructions

You need to add a space after called


#3

I've tried that multiple times but it just keeps saying the same thing.


#4

@taylorfoster

Please print your code after updates.


#5

'''
// Click on "Stuck? Get a hint!" if you get stuck!
var names = ["name1","name2","name3","name4","name5"];
for ( var i = 0; i < names; i ++) {
console.log ("I know someone called " + names[i])
}
'''
Oops, try again. Your code should have printed 'I know someone called name1', 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!


#6

@taylorfoster

It should be names.length because we are compairing numbers, not array and numbers!

Remove that space between your console.log and (


#7

// Click on "Stuck? Get a hint!" if you get stuck!
var names = ["name1","name2","name3","name4","name5"];
for( var i = 0; i < names; i ++) {
console.log("I know someone called " + names[i])
}

Oops, try again. Your code should have printed 'I know someone called name1', 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!


#8

@taylorfoster

Did you made the changes I mentionned in the post?


#9

oh sorry i didn't see that my wifi is working very slow right now thank you!