Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Show two decimal places, returns a string
- VARIABLE.toFixed(2);
- // Show as USD Currency
- VARIABLE.toLocaleString( 'USD', { style: 'currency', currency: 'USD' } );
- // Show as USD Currency with commas
- VARIABLE.toLocaleString( 'en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement