qjs_eval {QuickJSR} | R Documentation |
qjs_eval
Description
Evaluate a single Javascript expression.
Usage
qjs_eval(eval_string)
Arguments
eval_string |
A single string of the expression to evaluate |
Value
The result of the provided expression
Examples
# Return the sum of two numbers:
qjs_eval("1 + 2")
# Concatenate strings:
qjs_eval("'1' + '2'")
# Create lists from objects:
qjs_eval("var t = {'a' : 1, 'b' : 2}; t")
[Package QuickJSR version 1.3.1 Index]