5/7 Answer was "176" says its correct?


#1

After running this code the number 176 came up and says that its correct. Isn't the name "Alex" suppose to show up?

text = "Waazzaaaa Alex? How have \
you been, maaaaan? Yo, Alex did you hear about \
what happen to that other dude named Alex?";

var myName = "Alex";

var hits = []

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


#2

*UPDATE

Now Im getting 12 its still correct.

text = "Waazzaaaa Alex? How have \
you been, maaaaan? Yo, Alex did you hear about \
what happen to that other dude named Alex?";

var myName = "Alex";

var hits = []

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