Skip to content

Commit bfe84da

Browse files
author
Eric
committed
89차 3번 문제풀이(푸는중)
1 parent 3e0b17a commit bfe84da

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

live8/test89/문제3/황장현.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
function compare(a, b) {
2+
if (b.toString()[0] !== a.toString()[0])
3+
return b.toString()[0] - a.toString()[0];
4+
else {
5+
}
6+
}
7+
8+
function solution(numbers) {
9+
numbers.sort((a, b) => compare(a, b));
10+
console.log(numbers);
11+
}
12+
13+
console.log(solution([6, 10, 2, 11]));
14+
// console.log(solution([3, 30, 34, 5, 9]));

0 commit comments

Comments
 (0)