If I execute the following code snippet:
obj = {};
obj['number'] = 1;
obj['expressionS'] = 'Sin(0.5 * c1)';
obj['compiledExpressionS'] = null;
let cnr = 'c' + obj.number;
let params = {};
params[cnr] = 2;
var parsedExpressionS = math.parse(obj.expressionS);
obj.compiledExpressionS = parsedExpressionS.compile();
let value = obj.compiledExpressionS.eval(params);
An error is thrown at the last line which states: (intermediate value)(intermediate value)(intermediate value) is not a function. The code utilizes the Mathjs library (documentation available here: ). Despite my efforts, the reason behind this error remains unclear to me.