Boolean
Last updated
Last updated
A Boolean is a data type that represents one of two values: true
or false
.
Basic Definition:
A Boolean value is either true
or false
. These values are typically the result of comparison operations or logical expressions.
Type Conversion:
Any value in JavaScript can be converted to a Boolean using the Boolean()
function or double negation !!
. Examples: