Unclear why the code doesn't run. 'ReferenceError: j is not defined at Object.'

const bobsFollowers = [‘Jim’, ‘John’, ‘Frank’, ‘Tom’];
const tinasFollowers = [‘Jack’, ‘Jim’, ‘Frank’];
const mutualFollowers = ;

for (let i = 0; i < bobsFollowers.length; i++) {
for (let j = 0; j < tinasFollowers.length; j++); {
if (bobsFollowers[i] === tinasFollowers[j]) {
mutualFollowers.push(bobsFollowers[i]);
}
}
}

You have a syntax error after the clause for the 2nd for loop: The semicolon doesn’t belong there.
Please mind the guide for code formatting in future posts:

2 Likes

Oops! I thought I was going nuts. Thanks for the help!

1 Like