The number to check.
'true' if the number is a power of two, 'false' otherwise.
isPowerOfTwo(4); // Returns true
isPowerOfTwo(10); // Returns false
Checks if a given bigint is a power of two.
The bigint to check.
'true' if the bigint is a power of two, 'false' otherwise.
isPowerOfTwo(4n); // Returns true
isPowerOfTwo(10n); // Returns false
Generated using TypeDoc
Checks if a given number is a power of two.