Use !! to see how JavaScript would coerce a real value into a boolean-ish interpretation.
console.log(!!" ") // true
console.log(!!"") // false
console.log(!!"0") // true
console.log(!!0) // false
Use !! to see how JavaScript would coerce a real value into a boolean-ish interpretation.
console.log(!!" ") // true
console.log(!!"") // false
console.log(!!"0") // true
console.log(!!0) // false
For further actions, you may consider blocking this person and/or reporting abuse
Ajmal Hasan -
EchoGlobal -
Jonas Scholz -
haXarubiX -
Top comments (2)
Heya, actually the last expression console.log(!!"0") should be true not false :)
You're absolutely right. I meant to say !!0 :)