What's wrong



Replace this line with your code. 

/*jshint multistr:true */

text = " hi, how are you my name is Sidhant, what about you, what is\ you name, Sidhant. As you know my name is Sidhant only and not Sidhant"

var myName = "Sidhant"
var hits = []

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


HI this line


instead of text[i] you should put j in the text[j]

Then here

(var j = i; i > i + myName.length;i++)

this part

i > i + myName.length

first you should put < instead of > and the first i should be j like that

j < i + myName.length

then here


change it to j++


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