gZany unfortunately this library does not work. it says 1-2 is equal to 1, which is clearly wrong.
i would sugegst using eval
instead of Math.abs
. this is a very safe and secure method that will get you the results you want.
function Solve(problem) {var Equation = problem;console.log("Answer: "+eval(Equation));}