On this page

JS EVAL

Core command JS EV JSEV

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

Syntax

JS EVAL <code>

Arguments

ArgumentRequiredValuesDefault
<code>YesJavaScript codeNone

Examples

JS EVAL println(2 + 2);

Details

It is the quick, file-free equivalent of JS RUN, with the same scripting functions (connect, db, print, println).

There is no sandbox: the code runs with the same trust as an extension JAR or a .bat file you run. Java classes are reachable (Java.type(...), Packages), and code that never waits, such as an endless loop, cannot be stopped with Ctrl+C.

Last modified in release 5.5.0.

Found something wrong or unclear on this page? , with the page address.