Created
June 27, 2019 20:55
-
-
Save gchacaltana/c471d08f358ef74dcbf6937bd9df3063 to your computer and use it in GitHub Desktop.
Formato numérico API Number
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
/** | |
* Formato numérico americano | |
* Resultado: 1,000,000,000 | |
* */ | |
const numberFormatUS = new Intl.NumberFormat('en'); | |
console.log(numberFormatUS.format(1000000000)); | |
/** | |
* Formato numérico de perú | |
* Resultado: 1.000.000.000 | |
* */ | |
const numberFormatPE = new Intl.NumberFormat('pe'); | |
console.log(numberFormatPE.format(1000000000)); | |
/** | |
* Formato numérico de francia | |
* Resultado: 1 000 000 000 | |
* */ | |
const numberFormatFR = new Intl.NumberFormat('fr'); | |
console.log(numberFormatFR.format(1000000000)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment