Write a new function named biggestPowerOf2 that receives a number as a parameter, and returns the biggest positive power of 2 that is less than or equal to this number.
If no positive power of 2 is less than or equal to the number, the function should return -1.
number
=number
=number
=number
=Unlock all functions
The first 10 functions are free. Get lifetime access to all 100 with a one-time payment — no subscription.
Upgrade to Pro