Skip to content

Commit b82e64e

Browse files
authored
Update functionalty.js
1 parent a83ee5b commit b82e64e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functionalty.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ function sumOfArray(array) {
1313
}
1414

1515
function ascending(array) {
16-
16+
array.sort(function(a, b) {return a - b;});
1717
}
1818

1919
function descending(array) {
20-
20+
array.sort(function(a, b) {return a - b;}).reverse();
2121
}
2222

2323
function minArray(array) {

0 commit comments

Comments
 (0)