This is way over my head.. Help please?


#1


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


I don' know what I'm missing. I tried following the instructions.


/*jshint multistr:true */
var text = "I'm the Doctor. I'm a Time Lord. I'm from the planet Gallifrey in the Constellation Heather of Kasterborous. I'm 903 years old and I'm the Heather man who is gonna save your lives and all 6 billion people on the planet below. You got a Heather problem with that?";
var myName ="Heather";

var hits= []
for  (var i = 0; i > text.length; i++) {
  if (text[i] === "H") {
      for (var j = i; i > text.length; i++)
      newArray = [];
      newArray.push("Heather");
      newArray[0]
      
  }
}


#2

Your loop has to end one position more of your name length
for( j = i; j< i + myName.length; j++){
}


#3

@chipninja26336,
Try to read this,,,
https://discuss.codecademy.com/t/i-passed-this-but-i-just-need-someone-to-explain-the-second-for-loop/30895/2?u=leonhard.wettengmx.n


#4

Thank you so much, that fixed it. I thought I'd tried that already but maybe I looked over it and missed it because something else was wrong.


#5

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