I've spent an hour reading other threads with this exact problem, but have not figured out the problem with my code. I HAVE to be very close. It's probably something really stupid.
var text = "All work and no play makes Bruce a dull boy. \ And when Bruce is a dull boy, he is really no fun."; var myName = "Bruce"; var hits= ; for (var i = 0; i<text.length; i++); if (text[i]==="B") for (var j = i; j < i+myName.length; j++) hits.push(text[j]);