- 1
The result of the condition isn't a boolean, it's the value of the condition which is can be truthy or falsey as well
When you do any conditional statement it doesn't always return true or false but the a value of the condition. Var bob = 3; Var Dave = 'I'm dave' ; If (bob && Dave) returns 'I'm dave' not true, as a string is truthy Var Dave = 0 If (bob && Dave) Returns 0 which is falsey.
2 Respuestas
+ 7
AFAIK, everything which is not 0 or not false is true.
0
The result of the condition statement is always:
// A Boolean value (true or false)