반응형

 

 

** Javascript

 

reduce 만세

 

 

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

 

 

 

 

반응형

+ Recent posts