Skip to content

Convert number to US Dollars in JavaScript

Find out how to convert numbers to US Dollars in JavaScript.

var format2USD = new Intl.NumberFormat('en-US', {
            style: 'currency',
            currency: 'USD',
            minimumFractionDigits: 2,
         });
        
         console.log(format2USD.format(137));
See also  Unique Morse Code Words - Leetcode Challenge - Java Solution

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.