JavaScript quick reference

Runs in Zerethon IDE · Node.js 22 Official JavaScript documentation ↗

JavaScript on Node.js 22: values, let/const, control flow, functions, arrays and objects, strings, async code, stdin and files — and how a program runs in Zerethon IDE.

Written for Node.js 22. Examples that show an output were run in the Zerethon sandbox (Node.js 22) on 2026-10-20.

Basics

  • Hello, World

    The smallest Node.js program, and how console.log() prints.

  • Variables and types

    const and let, numbers, strings, booleans, null / undefined, and converting between types.

  • Conditions and loops

    if / else, switch, for, for…of, while, and the ternary operator.

  • Functions

    Function declarations, arrow functions, default parameters, rest parameters and destructuring.

Data

Input and files

In Zerethon IDE

  • Running JavaScript in Zerethon IDE

    What Run does with your project, the time limit, input, tests, and what a run cannot do.

  • Common errors

    What ReferenceError, TypeError, SyntaxError and “Cannot find module” mean and how to fix them.

  • Official documentation

    Where to read more: MDN for the language, the Node.js 22 docs for fs, process and other built-in modules.

References