JS EVAL

Core command JS EV JSEV

Runs a short piece of JavaScript typed directly on the command line

Arguments

<code> (mandatory) inline JavaScript code

Examples

JS EVAL println(2 + 2);

Notes

Runs a short piece of JavaScript typed directly on the command line: JS EVAL <code>, the quick, no-file equivalent of CommandJsRun. See docs/LIGHT_SCRIPTING.md for the full scripting API (connect/db/print/println).

No sandbox: a script runs at the same trust level as an extension JAR or a .bat file the user already runs. Java interop (Java.type(...), Packages) is available, and a script that never blocks (e.g. an infinite loop) cannot be interrupted with CTRL+C.

Last modified in release 5.1.2.