Ny Great Solution!


#1

Check it out!

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

if (hits.length === 0) {
    console.log("Your name wasn't found!");
} else {
    console.log(hits.substring(0, hits.length - 1));
}

#2

Maybe :
= https://www.codecademy.com/forum_questions/546e79b852f863fbe50001f7