A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/operators/logical_not below:

logical not ยท WebPlatform Docs

logical not Summary

Performs logical negation on an expression.

Syntax
result = ! expression
result
Any variable.
expression
Any expression.
Examples
var x = 5;
var y = 7;
var z;
z = ! (x = y); 
z = ! (y > x); 
Remarks

The following table illustrates how result is determined.

If expression is Then result is True False False True

All unary operators, such as the ! operator, evaluate expressions as follows:

The operator is applied to the resulting number.

For the ! operator, if expression is nonzero, result is zero. If expression is zero, result is 1.

Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4