Created
July 1, 2018 18:30
-
-
Save shobhitsharma/070e3a913c35b94dbfd10d6dd6e2fb10 to your computer and use it in GitHub Desktop.
Number to Binary in Javascript
This file contains 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
function numberToBinary(num) { | |
return Math.abs(num).toString(2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment