Algorithms and Data Structures implemented in JavaScript for beginners, following best practices.
Add code for checking whether given number is a power of 2 or not