Created
July 30, 2018 22:55
-
-
Save gladchinda/e54f6d4a88a4bf0e3a26edaee2e2d407 to your computer and use it in GitHub Desktop.
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
| function getDefaultNumberBase() { | |
| return 10; | |
| } | |
| function convertToBase(number = 0, base = getDefaultNumberBase()) { | |
| return parseInt(number).toString(parseInt(base)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment