Skip to content

Commit 031464f

Browse files
committed
문자열 정렬하기 (1) / 기초
1 parent 46b7464 commit 031464f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function solution(my_string) {
2+
var answer = [];
3+
for (let char of my_string) {
4+
if (!isNaN(parseInt(char))) {
5+
answer.push(parseInt(char));
6+
}
7+
}
8+
return answer.sort((a, b) => a - b);
9+
}

0 commit comments

Comments
 (0)