Update snippet descriptions
This commit is contained in:
@ -3,7 +3,7 @@ title: isPowerOfTwo
|
||||
tags: math,beginner
|
||||
---
|
||||
|
||||
Returns `true` if the given number is a power of `2`, `false` otherwise.
|
||||
Checks if the given number is a power of `2`.
|
||||
|
||||
- Use the bitwise binary AND operator (`&`) to determine if `n` is a power of `2`.
|
||||
- Additionally, check that `n` is not falsy.
|
||||
|
||||
Reference in New Issue
Block a user