Find Minimum In Array Javascript Iteration Methods