Update index.html

changed iteration function from using a counter for the index of the new array, to using javascript.push instead.