Published
Edited
Sep 3, 2021
1 star
Insert cell
Insert cell
Insert cell
currency = require('currency.js@2.0.4/dist/currency.min.js')
Insert cell
one = currency(123)
Insert cell
two = currency(1.23)
Insert cell
three = currency("1.23")
Insert cell
four = currency("$12.30")
Insert cell
{
var euro = value => currency(value, {
symbol: "€",
separator: ".",
decimal: ","
});
euro("2.573.693,75").add("100.275,50").format(); // "€2.673.969,25"
yield euro("1.237,72").subtract(300).format();
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more