Your Second "for" Loop 6/7 error


/*jshint multistr:true */

var text = "Hello, how are you doing today? Today we are going to discuss very important \ matters concerning Joey. Joey is a very good student.................."

var myName = "Joey"
var hits = []

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

It says to make sure that I'm pushing letters to the hits array. Can anyone help me please? It would be greatly appreciated. Also if you could tell me what I did wrong!


It should be:


As you want to push the letters, not the number it was found.

P.S. Nice Picture :slightly_smiling:


Ah, thank you! I completely overlooked that. It works now!

And thanks :grinning: Nintendo fan?


I'm a fan of many things, always loved Kirby! :slightly_smiling:


Go Kirby! That's probably one of my favorite series (well, not really true. But I do like Kirby when he's a playable character is Smash Bros. and et cetera.


The Smash Bros. Series is by far my favorite Nintendo game. Not necessarily using Kirby though.


Yeah, same here xD I used to REALLY love Kirby in it. I don't use him that much anymore though, actually, because he's not good in smash 4. I mostly use toon link and luigi now because they're really good combo-fighters