Second "For" loop confusion


#1

Here is my code. I know there are many things wrong but im not sure what they are.

var text = "Nick Nick Nick Nick Nick Nick Nick Nick Nick"
var myName = "Nick"
var hits = []
for(i=0;i< text.length;i++) {
if(text[i] === "N")
for(var i=0;i<Nick.length;i++)
newArray = [];
newArray.push("Nick");
newArray[0]
}

`


#2

this code looks really off, i always keep two extensive explanations i wrote about this topic:


open the topics and read them please, then read the exercise again, if you then need more help, post an updated version of your code


#3

thanks I already got it


#4