evaluate#
Evaluate an expression or an array with expressions.
Available in: math cells, REPL.
Syntax#
evaluate(expression)
evaluate(expression, scope)
evaluate([expr1, expr2, expr3, ...])
evaluate([expr1, expr2, expr3, ...], scope)
Arguments and behavior#
Pass an expression string and optional scope object. This evaluates the supplied expression and returns its value.
Example#
Edit the inputs, then use Run or Reset. Changes stay in this example.
Example
evaluate("2 + 3")Interactive examples could not load. You can still copy the expressions.
Expected result: 5.