Build & Tooling

runtime

A runtime is the engine that actually runs your code. Your source files are just text until something reads them and brings them to life — Node.js runs JavaScript on a server, the browser runs it on a page, and the JVM runs Java. The runtime is the stage your program performs on.

Knowing which runtime you're targeting matters: the same JavaScript can have different abilities in Node.js than in a browser, because each provides its own surroundings and built-in features.

'Runtime' also means a moment in time. Errors split into ones caught early — at 'compile time', before the program runs — and ones that only surface 'at runtime', while it's actually running and a bad value finally trips it up.

$ node --version
v20.11.0

Ask the JavaScript runtime on your machine which version it is.

'At runtime' vs 'at compile time' is one of the most useful distinctions to learn early.

Also called
node.jsjvmexecution environmentat runtime