Answers for "js Bitwise Operators"

3

js Bitwise Operators

Javascript Bitwise Operators
& AND statement
| OR statement
~ NOT
^ XOR
<< Left shift
>> Right shift
>>> Zero fill right shift
Posted by: Guest on January-04-2021
1

javascript bitwise flags

var myEnum = {
  left: 1,
  right: 2,
  top: 4,
  bottom: 8
}

var myConfig = myEnum.left | myEnum.right;

if (myConfig & myEnum.right) {
  // right flag is set
}
Posted by: Guest on July-22-2020

Code answers related to "js Bitwise Operators"

Code answers related to "Javascript"

Browse Popular Code Answers by Language