Your if Statement- Page keeps freezing


Your if statement - the page keeps freezing and then comes back with a message of page unresponsive. This happened on Lesson #3 Your first for loop, finally got it to go through.
But now I'm unable to move forward on this page. Anybody else have this problem?


Ok here's my code: this is lesson #4 Your if statement-

var text= " Hey Cheryl is terrifc\ she is learning to code. Cheryl is volunteering for the summer.";
var myName= " Cheryl";
var hits= [];

for(var i =0; 1if (text[i] === "C")


I didn't had this problem, but looking at your code I think you need to delete the number 1 before "if"


I see several issues. I hope these explanations over here can help you out, if not please ask again.


the for loop you create in this exercise, you removed it for a bit. You shouldn't have, you should have nested the if statement inside the for loop. (so between the {} of the for loop)


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