I am trying to use functions from an object, but having no success.
let ops = [
{'*': (a, b) => a * b},
{'/': (a, b) => a / b},
{'+': (a, b) => a + b},
{'-': (a, b) => a - b}
];
let res = [];
let current;
for (var i = 0; i < ops.length; i++) {
current = ops[i];
res = current(4, 2);
console.log(res);
}