Search Text for Your Name Tutorial 3#
Instructions:
Below your existing code, create a
Solve
var text = "Hello world Keya how you doing Keya";
var myName ="Keya";
var hits = [ ];
for(var i=0; i<text.length; i++ )
{}
Instructions:
Below your existing code, create a
for
loop that starts at 0, continues until it reaches the end of text
,
and increments by 1 each time. (This means it will check each character
in the string.) There's no need to write anything between the {}
s of your loop just yet.Solve
var text = "Hello world Keya how you doing Keya";
var myName ="Keya";
var hits = [ ];
for(var i=0; i<text.length; i++ )
{}
No comments:
Post a Comment