Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. // Show two decimal places, returns a string
  2. VARIABLE.toFixed(2);
  3.  
  4. // Show as USD Currency
  5. VARIABLE.toLocaleString( 'USD', { style: 'currency', currency: 'USD' } );
  6.  
  7. // Show as USD Currency with commas
  8. VARIABLE.toLocaleString( 'en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement