Infinite loops?!?!


I wrote this code and made variation after variation but it only freezes up. Can I get some help please?

 /*jshint multistr:true */

var text = "Amun, put the socks over there, Amun.";
var myName ="Amun";
var hits = [];

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


Same issue. Can't figure out what would be causing the infinite loop here:

var text = "Some text goes in here. My name is Jeff. The computer told me to write my name \
a few times. Jeff Jeff Jeff Jeff Jeff. I bow to my robot overlords."

var myName = "Jeff"

var hits = []

for(var i = 0; i < text.length; i++) {
    if(text[i] === 'J') {
        for(var k = i; i < myName.length + i; k++) {


Never mind. Found my issue. I think I've been staring at the screen too long. Didn't notice I had an i in the second loop that should be k (or j if you're using the same variables as it suggests). Looking at my code above with that change should answer your question.


What computer language is this?