Maximum Number In Array Javascript Iteration Method