I would like to format a price in JavaScript. I’d like a function which takes a float as an argument and returns a string formatted like this:

"$ 2,500.00"

What’s the best way to do this?

6
69

Leave a Reply

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