Wilang Documentation1.0.0+4

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")

Expected result: 5.

See also#

parser · parse · compile

All functions · Math guides