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
}
Also in JavaScript:
- HashLocationStrategy
- in javascript check is is an array or not
- how to get a toggle button to do different js functions
- JavaScript: Manipulating Complex Objects
- react with pure components
- how to use keytar electron
- input in js
- array method return boolean
- jquery abort ajax
- initialize express app
- how to check if object is undefined in javascript
- jquery remove array element by key
- javascript iterate through a binary tree
- difference between setTimeout() and setInterval()
- upload bloob javascript
- jquery multiple selectors
- use effect like component did mount
- js download file from webserver
- javascript event bind dynamic element
- javascript trigger click on element
- javascript convert string to json object
- console.log('qqqqqqqqqqqqqqqqqqqq'); jslint error how to fix
- gatsby underline link if page is active
- javascript read database