Hey guys how can I reorder the declaration of operators such that the result is 0 when logged??
numbers = [23, 12, 71, 10]
operators = [
(a, b) => a + b,
(a, b) => a / b,
(a, b) => a * b,
(a, b) => a - b
];
var result = 1;
operators.forEach(function(op) {
result = Math.floor(op(result, numbers[operators.indexOf(op)]))
});
console.log(result);
I'm halfway there but something just isn't clicking??
Cheers