5/7 Lets break it down!


So this is my code:

var text = "eok eok oek oke Rem oek oek oke oke Rem oke Rem";
var myName = "Rem";
var hits = []

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

I want to talk about this:

for(var j = i; j < i + myName.length; j++)

So i f I'm correct j = i; says that j is now the same as i and starts at 0 because the letter R was founded. Now this part:

j < i + myName.length;

I have actually no idea what it says. From my understanding it says: J is smaller than i + 3 (My name is Rem). I HAVE NO CLUE WHAT THAT MEANS. What does it do??? I'm confused. Correct me if I'm wrong cheers!


yeah its confusing i am working on it too.maybe in sometime i will solve that.
GOOD POINT:grinning:


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