I am tring to make an array with duplicate elements. For example:
var myArray = ["one", "two", "five"];
when I'm looping through the for loop:
for(var i = 0; i < myArray.length; i++){
myArray.push(myArray[i]);
}
my browser crashes! I don't get any meaningful error. Could someone explain why is this happening?
.push()increasesmyArray.lengthby 1.