Skip to content

Commit c06c452

Browse files
committed
Fix return statement in numberSort function
1 parent 50a7cb3 commit c06c452

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)