DEV Community

Mehul Lakhanpal
Mehul Lakhanpal

Posted on

Convert to Boolean

Alt Text

Thanks for reading 💙

Follow @codedrops.tech for daily posts.

InstagramFacebook

Micro Learning ● Web Development ● Javascript ● MERN stack

www.codedrops.tech

Top comments (2)

Collapse
 
jonrandy profile image
Jon Randy 🎖️

Solution 3 - why bother? JS has the concept of truthy and falsy. Understand it, and take advantage of it

Collapse
 
llagerlof profile image
Lawrence Lagerlof

Please, can you provide some use case where this will be useful?