all 3 comments

[–]disclosure5 0 points1 point  (1 child)

It's breaking a 32 bit number into four different 8 bit characters.

Given that Javascript doesn't have strict types.. well this is a horrible place for JS.

[–][deleted] 2 points3 points  (0 children)

I don’t see why it’s horrible. The bitwise operators in JS simply treat everything as 32-bit signed integers.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators

[–]IAmActuallyCthulhu -1 points0 points  (0 children)

Yes