I am getting an array value after an operation.
let data = formula.map(a => typeof a === 'number' ? result[index++] : a)
My output that I am getting is
data=["6.9","+","7.1","-","3.0"]
I wanted to perform normal math operation on this data like 6.9+7.1-3.0 so my end output will be
endresult = 11
eval(data.join(''))although there is security risk associated to it. please refer : developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…!+, - * / %