1
Hi, I think I’d look like this:
var text = "my name is Emerson";
var myName = "Emerson";
var hits = [];
for(i=0; i< text.length; i++){
if(text[i] === myName[0]){
for (var j = i; j < myName.length+i; j++) {
hits.push(myName[j-i]);
};
}
}
Hugging, good study.
Posting the code is better than the image.
– rubStackOverflow