mirror of
https://github.com/github/codeql.git
synced 2026-07-26 05:29:42 +02:00
5 lines
105 B
JavaScript
5 lines
105 B
JavaScript
function bitIsSet(x, n) {
|
|
return (x & (1<<n)) !== 0;
|
|
}
|
|
|
|
console.log(bitIsSet(-1, 31)); // prints 'false'
|