Values

in JavaScript

This is an entry in Marek's JavaScript Compendium. Last updated 2019-20-23.

A value is a basic unit of data in JavaScript that can be defined in a few ways:

A value is the result of the evaluation of an expression. Typically, values are also used as inputs to evaluate an expression.

Values can be assigned to variables. They can also be assigned to slots in arrays and objects.

Values can be passed into function calls as arguments. Every function calls ends with a value being returned or a value being thrown.

Values are separated into two groups: primitive values and reference values.