👍🏻 2022년 1월 21일
<script>
function solution(numbers) {
var answer = -1;
let totalNumbers = [0,1,2,3,4,5,6,7,8,9];
const reducer = (acc, val) => acc + val;
let totalSum = totalNumbers.reduce(reducer);
let inputSum = numbers.reduce(reducer);
answer = totalSum - inputSum;
return answer;
}
</script>