📅  最后修改于: 2022-03-11 15:04:29.844000             🧑  作者: Mango
function sumTwoSmallestNumbers(numbers){
function sortNumber(a , b){
return a - b
}
numbers.sort(sortNumber)
// console.log(numbers)
return numbers[0] + numbers[1]
}
// sumTwoSmallestNumbers([5, 8, 12, 19, 22])
sumTwoSmallestNumbers([15, 28, 4, 2, 43])