Closed balamurugansd closed 2 years ago
a = new BigNumber(1);
b = new BigNumber(2);
c = new BigNumber(3);
d = new BigNumber(4);
result = a.times(b).plus(c.div(d));
console.log(result.toString()); // '2.75'
Will it take care of BODMAS rule?
Please define acronyms the first time you use them.
@MikeMcl Is it possible to execute the expression based on rules,
EG: a*b+c/d
For the above expression which is dynamic all the time, is it possible to evaluate accordingly, if so how? Will it take care of BODMAS rule?