1const arr = [14, 58, 20, 77, 66, 82, 42, 67, 42, 4]
2const min = Math.min(...arr)
3console.log(min)
1function sumTwoSmallestNumbers(numbers) {
2 numbers = numbers.sort((a, b) => {
3 return a - b; });
4}; //this will turn the numbers list into the 2 lowest numbers
1var arr = [5,1,9,5,7];
2var smallest = arr[0];
3
4for(var i=1; i<arr.length; i++){
5 if(arr[i] < smallest){
6 smallest = arr[i];
7 }
8}
9
10console.log(smallest);
11