There was an error while loading. Please reload this page.
1 parent 82f0b5c commit 38e71ccCopy full SHA for 38e71cc
level-1/서울에서-김서방-찾기.js
@@ -15,4 +15,13 @@ function solution(seoul) {
15
//정답 3 - prove-ability
16
function solution(seoul) {
17
return `김서방은 ${seoul.findIndex(v => v === "Kim")}에 있다`;
18
+}
19
+
20
+//정답 4 - jaewon1676
21
+function solution(seoul) {
22
+ var answer = '';
23
+ for (let i=0; i<1000; i++){
24
+ if (seoul[i] === 'Kim') return '김서방은 ' + i + '에 있다';
25
+ }
26
+ return 1;
27
}
0 commit comments