← Back to the Developer Tools category

JavaScript

Runs JavaScript in a sandboxed V8 isolate (no network, no bindings). The `args` input is bound to a local `args` array; the last expression — or an explicit `return` — becomes the result. `console.log` is captured to `stdout`; `console.warn` / `console.error` to `stderr`.

CodeJavaScriptExecute
Try this node

Inputs

NameTypeRequiredDescription
scriptstringYesThe JavaScript script to execute
argsjsonNoCommand line arguments (array of strings) to pass to the script
timeoutnumberNoExecution timeout in milliseconds (default: 5000)

Outputs

NameTypeDescription
resultjsonThe result of the script execution (return value or last expression)
stdoutstringCaptured console.log output
stderrstringCaptured console.error output
errorstringError message if script execution failed

Related Nodes in Developer Tools