The result of a boolean function is the variable's boolean value. It may also be employed to determine the boolean outcome of a condition, expression, etc.
Note: It should be noted that a variable or object with value is considered as a true boolean value. False boolean values are regarded as "0," "NaN," "empty string," "undefined," and "null."
Code #1: The program below will output true values.
Code #2: The program below will output false values.
Boolean new syntax (value)
Note: Because the types of v1 and v2 (objects) are different, the statement v1 = == v2 is false.