DEV Community

Discussion on: Null-checking in JavaScript

Collapse
 
awnton profile image
Anton Gunnarsson • Edited

I think the concepts of truthy and falsy values is both the best and worst thing about javascript. I love it when it works with me and hate it with my entire heart when it doesn't ¯\_(ツ)_/¯

With that said I would have written the snippet in the example as if (tokenInfo) :)