function sumTwoSmallestNumbers(numbers) {
const sorted = numbers.sort((a, b) => {
a - b;
});
return sorted[0] + sorted[1];
}
Its a question from code wars. This is my result but its failing one of the tests, where I sorted the array and tried to add the two smallest numbers. Can somone please help?