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.
Returns the number of leading zero bits in the 32-bit binary representation of a number. Math.clz32(1) returns 31 because 1 in 32-bit binary is 00000000000000000000000000000001.
Challenge: Use Math.clz32() and verify the result for input 1.