DEV Community

Discussion on: Bitmasks: A very esoteric (and impractical) way of managing booleans

Collapse
 
webdeb profile image
webdeb

Very nice explanation. In JS React actually uses Bitmasks for the modes it provides since you can wrap many modes into each other it gives you a simple way to pass all the available mode states as a single variable.
In Unix file permissions are handled this way: like 6 = 110 (read & write) or 7 = 111 (rwx)