Why do the loops work? (How do they ever match?)

Here, bobsFollowers[i] is the string (person) at index i in bobsFollowers
and if that matches someone in tinasFollowers, (maybe at index j)
then you want to add that person (or string) to the array mutualFollowers.
Note that mutualFollowers started out as an empty array.
And mutualFollowers.push(x) would add whatever is stored in x to that array.

So mutualFollowers.push(bobsFollowers[i]) adds the person from bobsFollowers at index i to the array mutualFollowers

1 Like

Ah okay. I understand now. Thank you!

I just want to say “Thank you SO much!” for explaining this. I’m finally started to understand nested loops! happy dance :slight_smile: