5. Your second "for" loop


Whats wrong with my code its telling me to push letters to my arrays.  Please help.

/*jshint multistr:true */
var text = "Hey, how are you \
doing? My name is Dylan";
var myName = "Dylan";
var hits = [];

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


The hits.push should be myName not text[j]



Mine :slight_smile::



Thank you this really helped me out!


I had the same issue. From what the instructions said I think it is correct. "If we find the first letter of the user's name we will add the number of letters of the user's name". It doesn't say it will add the user's name. Ex: "My name is Pineapple I love Picking them"

hits[Pineapple, Picking t] right?