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
云微 -
Jackson Dhanyel Santin -
Louis Austke -
Aryan Kargwal -
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 :)