Many people are struggling here, lets shorten your text variable a bit so it is easier to explain:
h i i _ R e m
0 1 2 3 4 5 6
i put some spaces so we can see it better, then put the index numbers under it (the underscore represent the actual space in the string), so far it make sense right?
so then your first loop:
for (var i = 0; i < text.length; i++)
Will loop over your string, stored in the text variable, so far make sense as well? The moment
i is 4, your if statement is true: if(text[i] === "R"), this also make sense?
So now, you want to push Rem into the array, how? Well, it is important to realize that the items are at indexed at 4,5 and 6, agree? At this moment in the loop
i is 4, so
i + myName.length is 7, so if you do
j < (myName.length + i), this will loop over your name. Just make sure to increase j each step of the loop (
j++). Hope this helps
If you need more help, post an updated version of your code + question + where and why you got stuck