Skip to Content
Getting Started

Getting Started

Install engine262 from npm:

npm install engine262

Evaluate a script

Create a realm, install the global bindings, and evaluate source text:

import { , , } from "@engine262/engine262"; const = new (); (); const = new (); const = .("1 + 2");
const result: ValueCompletion
result
;

This minimal realm example establishes the runtime context required to evaluate ECMAScript source.

For interactive exploration, open the classic playground or the DevTools playground.

Last updated on