Skip to main content

Evaluate JavaScript expression

Written by Wrk Product
Updated over 4 months ago

Evaluate a JavaScript expression and return the result. This action can be used to perform calculations, string manipulations, boolean operations, and other JavaScript computations.

Application

  • Code

Inputs (what you have)

Name

Description

Data Type

Required?

Example

JavaScript expression to evaluate

A JavaScript expression that can be evaluated to produce a result. Example: 1 + 1

Text (Long)

Yes

1 + 1

Configuration Details

The “Evaluate JavaScript Expression” Wrk Action supports running standard JavaScript code, including most built-in functions and syntax.

It embeds the V8 JavaScript engine, which means it should support modern ECMAScript language features such as let, const, arrow functions, object destructuring, array methods (map, filter, etc.), and JSON parsing.

You can call standard JavaScript global functions directly, including Math.*, JSON.stringify, Date, parseInt, and others.

Notes & Limitations

  • No browser APIs – Functions like window, document, fetch, setTimeout, and other DOM-related APIs are not available.

  • No Node.js APIs – You cannot use require(), fs, process, or other Node-specific modules.

Outputs (what you get)

Name

Description

Data Type

Required?

Example

Evaluation result

The result of evaluating the JavaScript expression. Example: 2

Text (Long)

No

2

Outcomes

Name

Description

Success

This status is selected if the job has successfully completed.

Requirements

  • N/A

Did this answer your question?