This code keeps crashing Safari :)


#1

/*jshint multistr:true */

var text = "NIKITANIKITANIKITA"
var myName= "NIKITA"
var hits =[]
for( var i=0;i if (text[i]=== 'N'){
for(var i=0;i hits.push(i);
}
}
}


#2

You've not got any semicolons at the end of these - add them.


#3

@jibblyj is correct, in order for Java Script to know that one piece (or line) of code is finished it requires a semi colon ";". Think of a semi colon as a full stop. without the fullstop, you just keep reading and you never know when to stop or when the sentence is finished. Hopefully I helped you @csswhiz28377