12. Loops and arrays II "SyntaxError: missing ) after argument list"


Not sure why I get this error message.


SyntaxError: missing ) after argument list

var names = ["cat", "taro", "hanako", "momo", "noboru"];

for (var i = 0; i < names.length; i++){
    console.log("I know someone called " names[i]);


HI this line

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

add a + before names[i] to concatenate the string with your name


You're missing the concatenate sign.

for (var i = 0; i < names.length; i++) {
    console.log("I know someone called" + names[i]);


I see! Thanks a lot wizmarco :slight_smile:


I see! Thanks a lot bayoishola20 :slight_smile:


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