Victory!


#1

for (i=0; i<text.length; i++)
{
if (text.substring(i,i+myName.length)===myName)
{
hits.push(text.substring(i,i+myName.length));
}
}

if (hits.length===0)
{
console.log("Your name wasn't found!")
}
else
{
console.log(hits)
}


#2

I'm not sure what the intention of the topic is, perhaps you'd like to explain that.


#3

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