Ugh im so lost please help (5. your second for loop)


#1


https://www.codecademy.com/courses/javascript-beginner-en-XEDZA/0/5?curriculum_id=506324b3a7dffd00020bf661#


ReferenceError: myname is not defined


/*jshint multistr:true */
var text = "hey what's up, my name \
is John! what's your name? did i mention \
my name is John? oh yeah, i did, by the \
way my name is John"
var myName = "John"

var hits = [ ]

for (var i = 0; i < text.length; i ++) {
    
if (text[i] === myname[0]) {
    
for (var j = i; i <myName.length;) {

}
}    
}
______________________________________________
please provide reference


#2

Compare this to the declaration,

var myName = "John"

JS is case-sensitive.

is in need of correction and completion. Have you had a chance to study the example in lesson 1? Take a close look at it.


#3

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