Created
March 19, 2018 19:58
-
-
Save pinkmomo027/99a24a2a3bc31773e48948784dc5dc15 to your computer and use it in GitHub Desktop.
JS count binary set bits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i.toString(2).replace(/0/,'').length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment