Skip to content

Commit 1ee9c89

Browse files
committed
Add 수박수박수박수박수박수박.js
1 parent 0711f46 commit 1ee9c89

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

level-1/수박수박수박수박수박수.js

+8
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,12 @@ function solution(n) {
2323
(i % 2 == 0 ? str = str + '수' : str = str + '박')
2424
}
2525
return str;
26+
}
27+
28+
//정답 3 - prove-ability
29+
function solution(n) {
30+
let answer = '';
31+
answer = "수박".repeat(n / 2)
32+
if(n % 2 !== 0) answer += '수'
33+
return answer;
2634
}

0 commit comments

Comments
 (0)