Closed dav-garcia closed 6 months ago
The math.map() callback supports up to three parameters: value, index and the array itself. Currently, only the first argument is accepted (without parenthesis). So, if I try to do this:
math.map()
Result = sum(map(Numbers, (v, i) => v * i))
I get "SyntaxError: Parenthesis ) expected".
Thanks very much.
Forget it. I've seen this is fully delegated to the math.js parser and it has support for defining custom functions: https://mathjs.org/docs/expressions/syntax.html#functions
Sorry for the noise!
The
math.map()
callback supports up to three parameters: value, index and the array itself. Currently, only the first argument is accepted (without parenthesis). So, if I try to do this:I get "SyntaxError: Parenthesis ) expected".
Thanks very much.