Troubleshooting code specifics [solved]

Hello,
Can someone help me understand why my code doesn’t seem to work :confused:
I’ve been checking it all over again and cannot find where the problem is

//my code

const rapperArray = [“Lil’ Kim”, “Jay-Z”, “Notorious B.I.G.”, “Tupac”];

// Write you code below
for
(let rapperArrayIndex=0;
rapperArrayIndex < rapperArray.length;
rapperArrayIndex++)
{ console.log(rapperArray[rapperArrayIndex]);

if (rapperArray[rapperArrayIndex] === 'Notorious B.I.G')
  {break;}
}
	console.log("And if you don't know, now you know.");

I literally thought the sane thing when they said "rapperArrayIndex

for (let rapperArrayIndex = 0; rapperArrayIndex < rapperArray; rapperArrayIndex ++){

}

but instead what i think what they referred to was rapperArrayIndex just being i.

I’m still looking for answers myself

1 Like

That would be,

rapperArrayIndex < rapperArray.length;
1 Like

You missed a dot after ‘G’ in if statement:

2 Likes

I made the same mistake. Missed a dot in B.I.G.
it’s so unforgiving!!

BINGO! i made the same mistake ty