Process

process.env

Exposes environment variables as strings or undefined. Parse and validate configuration explicitly; the string false is truthy. Never log the entire environment. This fixture uses a synthetic value only. Tested on Node.js 22.16.0. Example output (one line per entry): ["true", "true"].

Formal Syntax & Structure

nodejs syntaxnodejs
process.env.NAME

Return Value

object

Environment variable mapping.

Working Example

Example Snippetnodejs
process.env.BM_DEMO_LIMIT = '8';const n = Number(process.env.BM_DEMO_LIMIT);console.log(Number.isInteger(n) && n === 8);delete process.env.BM_DEMO_LIMIT;console.log(process.env.BM_DEMO_LIMIT === undefined);
Node.js Reference