Why isnt it working


var text = 'Hey guys Im Emmanuel';
var myName = 'Emmanuel';
var hits = [];
for(var i = 0; i > text.length; i++){
if(text[i] === 'E') {
for(var j = i; j < (i + myName.length); j++){


You have a useless closing bracket at the last line.


actually, the closing bracket on the last line is closing the for loop:

But, @ironfist34, if you need help, i need to know what lesson you are on, so I need either the name or the link.


Oops sorry, I didn't see that it's a loop inside a loop.


it's fine! It's what happens when the code isn't formatted :grimacing:
Even though it works unformatted, it's definitely harder to read.


iam on chapter 6 search text for your name section 5 and i did format it it just got like that because i copied it


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