Function isPower2

  • Checks whether a given number is a power of 2 greater than 0.

    Parameters

    • number: number

      The number to check

    Returns boolean

    Returns true if the number is a power of 2 greater than 0