𝙻𝚎𝚊𝚛𝚗 𝚜𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐 𝚎𝚟𝚎𝚛𝚢 𝚍𝚊𝚢. JavaScript is my specialty, often playing with Node, React, TypeScript, GraphQL & Ruby on Rails. 5+ years building the web as a Front End Dev.
Location
North Vancouver
Education
Self-taught and always learning
Work
Software Engineer | Building Web 3 with Figment.io
I'm a big fan of !! which gets the boolean value of (pretty much) anything:
lettruthiness=!!12//=> truelettruthiness=!!0//=> falselettruthiness=!!'string'//=> truelettruthiness=!!''//=> false// BUT LOOK OUT FOR OBJECTS... 👀lettruthiness=!![]//=> truelettruthiness=!!{}//=> true
! is the opposite so !! becomes the boolean value !! 😄
I'm a big fan of
!!
which gets the boolean value of (pretty much) anything:!
is the opposite so!!
becomes the boolean value!!
😄The Boolean() constructor is another great way to interpret falsey values.
Thanks for sharing! 🙏🙏