Only prints the first letter of my name


#1

Hi, I've used your code to correct mine. It is accepting it, but it only prints the first letter of my name:
var text = "Ela to fajna dziewczyna i Ela jedzie z nami na wycieczke, Ela bierze prowiant: kielbe i bule.";
var myName = "Ela";
var hits = [];

for (var i=0; iif ( text[i] === "E")
{
// console.log(myName); }
for (var j = i; j< myName.length+i; j++)
{ hits.push (text[j]);
hits [0];
}}}


Stuck on second loop push problem?
#2
for (var i=0; iif ( text[i] === "E")  // "iif"? +Are you sure about the for loop syntax?
{ 
// console.log(myName); } 
for (var j = i; j< myName.length+i; j++)
{ hits.push (text[j]);
    hits [0];  // <= what's this line for?

@blogwhiz08704 Hi Ely, I added some comments to your code. Maybe you lost a piece when you copy-pasted?