Code Please


#1

Can someone please give me a code that works.


#2

@neeliyer Can I see your code please?


#3

I haven't really paid much attention to this lesson. I just want to go to the next one.

var text='Hey, how are you doing? My name is Neel.';
var myName = 'Neel';
var hits = [];
for (var i = 0; i < text.length; i++) {
if(text[i]==='N') {
for (var j=i; j
console.log(myName);
}
}
if (hits.length === 0)
{
console.log("Your name wasn't found!");
}
else
{
console.log(hits);
}

@dantemp


#4

@neeliyer That's not that good of an idea, the lessons are the way they are for a reason.

Your problem is for (var j=i; j, you need to complete the for loop.