Find the smallest number in an array javascript