working with arrays in JS on HTML