How does this work


#1

var text = ("i'm hungry chicken Julia hungry chicken Julia")
var myName = "Julia";
var hits = []

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

Oops, try again. There was a problem with your syntax.


#2
if(hits.length === 0) {