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

Опубликовано: 27 Июль 2021
на канале: 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.


На этой странице сайта вы можете посмотреть видео онлайн When does "true" equal "false" in JavaScript? длительностью online в хорошем качестве, которое загрузил пользователь Andrew Hoffman 27 Июль 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,117 раз и оно понравилось 4 зрителям. Приятного просмотра!