Iterating Through Array Javascript Append