Binary Journey

[프로그래머스] 내적 본문

프로그래머스/level 1

[프로그래머스] 내적

binaryJournalist 2021. 9. 1. 18:21
반응형

 

 

** Javascript

 

reduce 만세

 

 

function solution(a, b) {
    const answer = a.reduce((acc, curr, index, arr) => acc + curr * b[index], 0);
    return answer;
}

 

 

 

 

반응형