What's wrong with this code?


#1

var text = "Oi, como vai,meu nome é\
Cláudio Junior";
var myName="Cláudio junior";
var hits =[];
for(var i = 0; i < text.length; i++){

 if(text[1] === "C"){
     for(var C =i; C <i+ nyName.length; C++);
     hits.push(text[C]);

}
}
}


#2

@dataplayer26365,

Have a close look at

nyName


#3

I corrected, but still can not pass this lesson


#4

Hi @dataplayer26365,

Some notes:


See also: Using backticks to format your code


Finally, from Google Style Guide:

In general, use functionNamesLikeThis, variableNamesLikeThis, ClassNamesLikeThis, EnumNamesLikeThis, methodNamesLikeThis, CONSTANT_VALUES_LIKE_THIS, foo.namespaceNamesLikeThis.bar, and filenameslikethis.js.

Note that it is recommended for variable names start with lower case. We'll be using upper case in a later lesson.

frisby