DEV Community

Discussion on: Interesting use cases for JavaScript bitwise operators

Collapse
 
jtenner profile image
jtenner

Another really good example you might like to include is this:

// treat a signed value like an unsigned int
const unsignedValue = value >>> 0;

console.log(-1 >>> 0);
// 4294967295 or 0xFFFFFFFF