#5 confusion


#1

Sadly I must admit defeat a second time. Once again I have literally no idea where I've gone wrong.
Code:
var text = "Joe thing thing potato kittens hashtag \ Joe kaboom kersplat vroom screeeee \ Joe carrot nottthing thingnot swagnado";
var myName = "Joe";
var hits = [];

for (var i = 0; i > 20; i++) { //Changed to 20 instead of text.length for testing purposes.
console.log("Test") //For testing purposes.
if (text[i] === "J") {
for (var j = i; j > i + myName.length; j++) {
hits.push(text[j]);
};
};
};
console.log(hits[0]); //For testing purposes.

It doesn't even log "Test"


#2

This is because i is never greater than 20. Change the greater than to less than. Same for the other for loop.

for (var i = 0; i *>* 20; i++)

#3

Thanks for the help,

I swear, I'm literally useless whenever greaterthan/lessthan symbols are used...