Runtime

Runtime is the period when a program is actually running. It also refers to the environment that executes the program, such as the Node.js or Java runtime.

General Programming

Errors are often described as either compile-time (caught before the program runs) or runtime (only appear while the program is executing, like dividing by zero or reading a missing file).

A runtime environment provides the services a program needs to run — memory management, input/output, and built-in functions.

Examples

JavaScript

const nums = null;
console.log(nums.length); // fails while running

Output:

TypeError: Cannot read properties of null (reading 'length')

See also

Back to the Dictionary