Created
March 23, 2020 14:55
-
-
Save sasknot/831e4edf1dd51cd038c8d6c3714c322f to your computer and use it in GitHub Desktop.
JS: Remove chars from ending
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
output.split('').slice(0, -3).join('') + '.000' | |
Ex: | |
'1000000'.split('').slice(0, -3).join('') + '.000' // 1000.000 | |
'100000'.split('').slice(0, -3).join('') + '.000' // 100.000 | |
'10000'.split('').slice(0, -3).join('') + '.000' // 10.000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment