An Interest In:
Web News this Week
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
- March 13, 2024
- March 12, 2024
November 24, 2021 08:53 pm GMT
Original Link: https://dev.to/icncsx/boolean-coercion-2ckc
Boolean coercion
Use !! to see how JavaScript would coerce a real value into a boolean-ish interpretation.
console.log(!!" ") // trueconsole.log(!!"") // falseconsole.log(!!"0") // false
Original Link: https://dev.to/icncsx/boolean-coercion-2ckc
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To