JavaScript Bitwise AND Operator



Bitwise AND Operator

& symbol is used for Bitwise AND operator.

Bitwise AND operator takes two values/variables as operands, performs AND logic gate operation at bit level, and returns their result.

a & b
6 & 74

Examples

1. Bitwise AND of values in a and b.

a = 7;
b = 14;
output = a & b;
console.log(`${a} & ${b} = ${output}`);