mirror of
https://github.com/github/codeql.git
synced 2026-01-18 00:44:45 +01:00
5 lines
103 B
JavaScript
5 lines
103 B
JavaScript
function bitIsSet(x, n) {
|
|
return (x & (1<<n)) > 0;
|
|
}
|
|
|
|
console.log(bitIsSet(-1, 31)); // prints 'false'
|