I don't know how to set the second for loop


I don't understand logic behind setting the second for loop. If someone can help explain why the second for loop is to be created and the logic behind it, It'll help me greatly understand.

Here's my code:

/*jshint multistr:true */
var text = "some text";
var myName = "Evans";
var hits = [];

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


such explanations are very time consuming to write, please read what i wrote in this topics:

If you then have any questions, i will answer.


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