I wanted to test my understanding of for loops on my own in JS Fiddle and for the most part my function is acting as intended.
I want my for loop to increment i for however many times specified when the function is called, which it is doing. In my for loop I added the line nameArray.shift; hoping that after the first item in the array was moved to new array it would be shifted out of name array. Right now, the function is just adding name 1 several times. What am I doing wrong?