Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 24, 2021 08:53 pm GMT

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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To