JavaScript basics logical operators

JavaScript basics logical operators

In today's article, we'll be looking at JavaScript logical operators. JavaScript comes with three logical operators being and, or and not.

Check out the below table of the basic use cases.

OperatorLogicExample
&&Anda = true && b = false
`\\`Or`a = true \\b = false`
!Notlet a = true
!a // false

© 2022 开源博客 京ICP备20030565号-2 Powered by Quick API team