DEV Community

front_end_shifu_2022
front_end_shifu_2022

Posted on

logical operater(Not !)

! (NOT)

Converts the operand to boolean type: true/false.
Returns the inverse value.
he syntax is pretty simple: result = !value;
e.g.
alert( !true ); // false
alert( !0 ); // true

A double NOT !! is sometimes used for converting a value to boolean type:
e.g
alert( !!"talha" ); // true
alert( !!0 ); // false

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay