Cant push array either


I cant run this loop

I'm getting a syntax error one; and two i know the loop isn't working even without the syntax error

/*jshint multistr:true */
var text = "Woah, I haven't seen Jordan in forever! \
Jordan and I used to be so close.";
var myName = "Jordan";
var hits = [];

for (var i = 0; i < text.length; i++) {
 if (text[i] === 'J'){
 for(var j = i; j < (i+myName.length){


You did not finish you second for loop.


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