Boolean coercion

Use !! to see how JavaScript would coerce a real value into a boolean-ish interpretation.

console.log(!!” “) // true
console.log(!!””) // false
console.log(!!”0″) // false


This content originally appeared on DEV Community and was authored by icncsx

Use !! to see how JavaScript would coerce a real value into a boolean-ish interpretation.

console.log(!!" ") // true
console.log(!!"")  //  false
console.log(!!"0") //  false


This content originally appeared on DEV Community and was authored by icncsx


Print Share Comment Cite Upload Translate Updates
APA

icncsx | Sciencx (2021-11-24T20:53:57+00:00) Boolean coercion. Retrieved from https://www.scien.cx/2021/11/24/boolean-coercion/

MLA
" » Boolean coercion." icncsx | Sciencx - Wednesday November 24, 2021, https://www.scien.cx/2021/11/24/boolean-coercion/
HARVARD
icncsx | Sciencx Wednesday November 24, 2021 » Boolean coercion., viewed ,<https://www.scien.cx/2021/11/24/boolean-coercion/>
VANCOUVER
icncsx | Sciencx - » Boolean coercion. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/24/boolean-coercion/
CHICAGO
" » Boolean coercion." icncsx | Sciencx - Accessed . https://www.scien.cx/2021/11/24/boolean-coercion/
IEEE
" » Boolean coercion." icncsx | Sciencx [Online]. Available: https://www.scien.cx/2021/11/24/boolean-coercion/. [Accessed: ]
rf:citation
» Boolean coercion | icncsx | Sciencx | https://www.scien.cx/2021/11/24/boolean-coercion/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.