clz32intermediate// Count leading zero bits in a 32-bit integer
Math.clz32(1) // β 31
Math.clz32(4) // β 29Use Math.clz32() to count leading zero bits of a 32-bit integer, useful in low-level bitwise optimizations.
Math.clz32(0) returns 32 because all 32 bits are zero.
Challenge: Verify the leading zero count for 0.