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
| Argument | Required | Values | Default |
|---|---|---|---|
<code> | Yes | JavaScript code | None |
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.
Related
- JS RUN, a saved script
- JavaScript scripting
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.