Advertisement
NubeColectiva

Como Generar Números Compactos con la "Intl API" de JavaScript

Apr 17th, 2023
1,012
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const formatear = Intl.NumberFormat('en', {
  2.     notation: 'compact'
  3. });
  4.  
  5. const numero = 13567;
  6.  
  7. console.log(formatear.format(numero));
Tags: JavaScript js
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement