Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3bce447

Browse files
yongchansonprove-ability
authored andcommitted
내적 - 솔루션 추가
1 parent 4da5567 commit 3bce447

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎level-1/내적.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,14 @@ function solution(a, b) {
55
var answer = 1234567890;
66
answer = a.reduce((x, y, i) => x + y * b[i], 0)
77
return answer;
8-
}
8+
}
9+
10+
//정답 2 - yongchanson
11+
function solution(a, b) {
12+
var answer = 0;
13+
14+
for(i=0; i<a.length; i++) {
15+
answer += a[i] * b[i]
16+
}
17+
return answer;
18+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /