When does "true" equal "false" in JavaScript?

Publié le: 27 juillet 2021
sur la chaîne: Andrew Hoffman
1,117
4

👍👍👍 and subscribe for more:    / @and1hof  
Check out my best selling AppSec book: https://amzn.to/3pGO4Vz
Check out my behind-the-scenes newsletter: https://www.andrewhoffman.me/newsletter/

The ! operator in JavaScript converts an object to a boolean and than flips it from true to false or from false to true. Operations involving this operator can get confusing, in this case the strings equate because they are comparing length rather than value after being coerced into booleans and flipped.


Sur cette page du site, vous pouvez voir la vidéo en ligne When does "true" equal "false" in JavaScript? durée online en bonne qualité , qui a été Téléchargé par l'utilisateur Andrew Hoffman 27 juillet 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,117 fois et il a aimé 4 téléspectateurs. Bon visionnage!