3. Values
JavaScript is dynamically typed: any value produced by a calculation
has a type that can be Boolean, number, string, function, or object.
However, variables do not have a type and can contain values of different
types in succession (although this is not necessarily recommended).
JavaScript values are said to be first-class citizens because there
are no restrictions on their use: they can be stored in variables,
arrays, objects, passed as function arguments, or returned as function
results.
We distinguish between primitive types such as Boolean, number,
character string, or symbols, and objects, which are basically associative
tables. There are also predefined object types (classes), for example,
Date
,
RegExp
or
Error
There are also two
singletons...
You do not have access to this resource.
Exclusive to subscribers. 97% yet to be discovered!
Already subscribed?
Log in!