How to format currency as per locale in JavaScript

Numbers
By Jad Joubran · 
Last updated Mar 04, 2018
const amount = 1999.9;
const options = {
  style: "currency",
  currency: "USD"
};

amount.toLocaleString("en-US", options);
$1,999.90