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/bitwise_and_assignment below:

bitwise and assignment ยท WebPlatform Docs

bitwise and assignment Summary

Sets the result of a bitwise AND operation on the value of a variable and the value of an expression. The variable and the expression are treated as 32-bit integers.

Syntax
result &= expression
result
Any variable.
expression
Any expression.
Examples

Using this operator is the same as specifying result = result & expression

The Bitwise AND Operator (&) looks at the binary representation of the values of result and expression and does a bitwise AND operation on them. The output of this operation behaves such that any time both of the expressions have a 1 in a digit, the result has a 1 in that digit; otherwise, the result has a 0 in that digit.


var expr1 = 9;


var expr2 = 5;


expr1 &= expr2;

document.write(expr1);

See also Other articles 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