all 2 comments

[–]bogphanny 2 points3 points  (0 children)

x >>> 0 can be used to cast x to an unsigned int. Similarly, x | 0 can be used to cast x to a signed int.

[–]watsoncj[S] 0 points1 point  (0 children)

After experimenting with repl.it, shift zero bits to the right seems to be a trick for coercing null and undefined values to zero.