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
arjun -
MD ARIFUL HAQUE -
Crypto.Andy (DEV) -
Dan Benitah -
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 :)