Skip to content

Commit 889b2a5

Browse files
authored
Merge pull request wesbos#14 from spaceinvadev/wrong-return-in-numberSort
Fix return statement in numberSort function
2 parents 50a7cb3 + c06c452 commit 889b2a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/46 - Arrays/array-methods.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
console.log(toppings.sort());
189189
// sort the order totals from most expensive to least with .sort()
190190
function numberSort(a, b) {
191-
return a - b;
191+
return b - a;
192192
}
193193
console.log(orderTotals.sort(numberSort));
194194
// Sort the prices with sort()

0 commit comments

Comments
 (0)