js Bitwise Operators
Javascript Bitwise Operators
& AND statement
| OR statement
~ NOT
^ XOR
<< Left shift
>> Right shift
>>> Zero fill right shift
var myEnum = {
left: 1,
right: 2,
top: 4,
bottom: 8
}
var myConfig = myEnum.left | myEnum.right;
if (myConfig & myEnum.right) {
// right flag is set
}
Also in JavaScript:
- javascript picture delete after time
- react map array limit
- js how to hide an image
- javascript queryselector
- bash expression
- reverse a number in javascript without using inbuilt function
- http request without a library in javascript
- three js get size of object
- for in loop javascript
- vuetify event handler
- postgresql json array contains
- iterate over enum angular ngfor
- Uncaught (in promise) SyntaxError: Unexpected token O in JSON at position 0
- how to make a factorial function in javascript
- jquery ready function
- jquery set att
- js number add zero before
- javascript validate is not a function problem
- jQuery check a radio button
- js get time in am
- laravel fetch post
- print hello world in javascript
- find key in nested json object
- lifecycle methods react