actual js code for manipulating_arrays.html file