I need your help for the second "for" loop


Ok so I kept trying to figure this out but I just gave up, not a good idea but I had to ask y'all


Error code: Oops, try again. There was a problem with your syntax.

/*jshint multistr:true */
var text = "enrhgjasjdnfjdksaifj hanjf ajkdfhkshdfkas fshdf hdkasewoifjvnxc khuhf sodif woqpr  fjdsj Ethan sfhdjs whejrx xd fjehw sndjkfla nsj dfkj fhdjskj fhskajsh whejkrj fhdsja shjkd";

var myName = "Ethan";

var hits = [];

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


You are missing a closing } :slight_smile: .


Im having a problem where the code displays the place value of my name, and saves them to the array, but I can't get it to display the data it finds at the place value. Help pleasee.


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