Skip to content

Commit 38a1f64

Browse files
committed
reverse string / 기초
1 parent 45ce6e5 commit 38a1f64

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

JustDevRae/Stack/reverse_string.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function solution(my_string) {
2+
var answer = "";
3+
const string = [...my_string];
4+
5+
for (let i = 0; i < my_string.length; i++) {
6+
answer += string.pop();
7+
}
8+
9+
return answer;
10+
}

0 commit comments

Comments
 (0)