DEV Community

Discussion on: JavaScript's unsafe optional chaining is crazy |:

 
jonrandy profile image
Jon Randy 🎖️

As I said, ~~undefined gives 0

Thread Thread
 
mnathani profile image
Murtaza Nathani

umm, interesting way.. never used it though, however not sure if this is the best practise or not..

Thread Thread
 
jonrandy profile image
Jon Randy 🎖️

Best practises should always be challenged and questioned

Thread Thread
 
mnathani profile image
Murtaza Nathani

Agreed, there's always more then one to do the stuff, whatever works best !