Loops and arrays II ERROR


Introduction to 'For' Loops in JS
Loops and arrays II link

I can't figure out my mistake. Please help!

This is what it's saying (ERROR MESSAGE) -
Oops, try again. Your code should have printed 'I know someone called A', 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!

My code -

var names = ['A','B','C','D','E'];
for (var i = 0; i < names; i ++) {
    console.log("I know someone called " + names[i]);


What have you done so far to solve this problem?

The error message describes a problem, do you agree with that problem, do your own observations match that?
What would some possible explanations be, and how can you test if those are indeed the problem?
What steps should the code be carrying out in order to produce the desired result? If followed, which of those steps would prevent the current behaviour?


Thank you for advice I did observe it again.
I do except the mistake was silly.
Next time I'll remember what you said.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.