Yet another 5/7 "Won't push" topic


#1

As the title says, I get an error that says the for loop isn't pushing values to the "hits" array. I've been all over this forum trying to figure it out, but I can't. Here's my code:

var text = "My name is Andre. The rest of this doesn't matter.";

var myName = "Andre";

var hits = [];

for (var i = 0; i < text.length; i++); {
if (text[i] === "A") {
for (var j = i; j < (myName.length+i); j++); {
hits.push(text[j]);
}
}
}


#2

Here

for (var i = 0; i < text.length; i++); {

and here

for (var j = i; j < (myName.length+i); j++); {

Remove the semicolon before the opening curly brackets