DEV Community

Discussion on: Converting values to boolean using !! (double NOT)

Collapse
 
ianwijma profile image
Ian Wijma • Edited

Fun fact, you can add as many ! you want, and it will keep on flipping the boolean value. Not really useful to add more then 2. But still interesting :)

!!!!!!!!!!!!!!true // Results in true
!!!!!!!!!!!!!true // Results in false
Enter fullscreen mode Exit fullscreen mode