Introduction
In this lab, we will explore a JavaScript function that determines whether a given number is a power of 2
. By using the bitwise binary AND operator and checking that the number is not falsy, we can accurately determine if a number is a power of 2
. This lab will provide an opportunity to practice using bitwise operators and logical operators in JavaScript.