I need HELP



The console says: Oops, try again. Careful: your second ‘for’ loop should stop when it reaches its current point in the string + myName.length. I am not sure what to do next.

/*jshint multistr:true */

var text="COLORS OF LIGHT Visible light is the part of the electromagnetic spectrum that our eyes can see. Light Tommyfrom the sun or a ligTommyht bulb may look white, but it is acTommytually a combination of many colors. We can see the difTommyferent colors of the spectrum by splitting Tommythe light with a prism. The spectrum is also visible whTommyen you see a rainbow in the sky. The colors blTommyend continuously into one another. At one end of the spectrum are the reds and oranges. TheseTommy gradually shade into yellow, Tommygreen, blue, indigo and violet. The colors have different wavelengths, frequencies, and energies. Violet has the shortest wavelength in Tommythe visible spectrum. That means it has theTommy highest frequency and energy. Red has the longest wavelength, and lowest frequency and energy.";
var myName="Tommy";
var hits=[];

for(var i=0; i<text.length; i++){
        for(var j=i; j<text.length; j++){


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