JavaScript employs data types to characterize the kind of data that variables can handle. These include number
, string
, boolean
, null
, undefined
.
The type of a JavaScript variable is dynamically determined by its value, allowing the type to change in accordance with its value.
JavaScript has special types: 'undefined
' and 'null
'. Each has only one value. 'undefined
' means that a variable has been declared but does not yet have a value. 'null
' implies the absence of a value. Note that we will use a special console.log
method, which outputs the result in the console.
