Note: If you know Wasm, then nothing I'll be talking about is new to you.
In most programming languages, the unary "+" operator (identity) is useless. It does nothing, returning its operand untouched.
+"3.14159" yields 3.14159.
When one wants to convert a double to an integer, one uses Math's methods, like floor, ceil, or round.
But there's another way: One can OR the number with zero, like let n = 3.14159 | 0;
It has the same effect as rounding it to zero decimal places.
One way to convert any value into true or false is to use a double not (!!).
The first ! converts any truthy values to false, and any falsy values to true. The second one fixes it, so truthy values become true and falsy values, false.
let n = -1;
n >>>= 0;
It seems nothing would change, but it reinterprets n as an unsigned 32-bit integer, so, in our example, -1 becomes 4294967295.
May 2022 be a whole lot better than 2021 to us all!