let a = num >>> 0;>>> is an unsigned right shift and 0 is the amount to shift. Cute. Normally numbers in javaScript are 64-bit floating point. So you don't overcute future programmers you can make a function:
function makeUnsigned(n) { return n >>> 0; }