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


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


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.


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