Loops and arrays II


I'm stuck here and I can't find the mistake. I red a few discussions about this excercise but there were no comments who
could help me to solve the problem.


Oops, try again. Your code should have printed 'I know someone called Lars', 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=["Lars","Hans","Lutz","Gerd","Ursula"];
for (var i =0; i <names.length; i ++) {
    console.log("I know someone called"+ names[i]);


console.log("I know someone called"+ names[i]);

add a space after called like so:
console.log("I know someone called "+ names[i]);


in the console log, after the + you need to add quotes as a space like so:

  console.log("I know someone called"+" "+ names[i]);


designer and sumo are both right. Your code is valid, but the problem is technical.
You must follow every detail of instruction. That's just the way the (application) console works ('You'll meet more of these in future). "Leave a space".


Thanks ! That helped a lot


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