Log it, I'm struggling here, not sure what I am doing wrong



Replace this line with your code. 
var text = "Hey, how are you doing Adonte? My name is Adonte!";
var myName = "Adonte";
var hits = [];
for (var i = 0; i < text.length; i++) {
    if (text[i] ==="A") {
        for (var a = i; a < i + myName.length; a++) {
if (hits.length === 0) {
    console.log("Your name wasn't found!")
} else {


this line:


you use a colon instead of a semi-colon at the end


hahaha woooooowwww o.m.g -_- thank you


I like the analogy someone made: Programming is like writing a book, except if you forget one semi-colon somewhere, your program won't work where as the book is still readable. Quit true here :wink:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.