I am writing an application that outputs a price. My code for formatting the price is the following:
var preis_formatted = new Number(preis);
var preis_formatted = Number(preis_formatted.toFixed(2)).toLocaleString("nl-NL");
My problem: There are outputs like "26,4" where the 0 of decimals after the comma are not shown. How do I achieve that the output will be "26,40"?