Get Min Value From Array Javascript Iteration