6/7 Printing out [' ', ' ', undefined]


#1

I have no idea what I'm doing wrong, it's probably some obvious mistake but I just can't find it.
Here's the code:

/*jshint multistr:true */

var text = "Ja Ja Ja Ja Patrik Ja Ja Patrik Ja Ja Ja Ja Ja Patrik";
var myName = "Patrik";
var hits = [];

for (var i = 0; i < text.length; i++) {
if (text[i] === "P") {
for (var j = i; j < myName.length + i; j++); {
hits.push(text[j])
}
}
}
if (hits.length === 0) {
console.log("Your name wasn't found!");
}
else {
console.log(hits);
}


#2

Sneaky little semi-colon at the end of your second for-loop. Never put a semi-colon after statements like loops or if's.