Formats a number using the local number format order.
Number.prototype.toLocaleString()
to convert a number to using the local number format separators.const formatNumber = num => num.toLocaleString();
formatNumber(123456); // '123,456' in `en-US`
formatNumber(15675436903); // '15.675.436.903' in `de-DE`
JavaScript, Math
Formats a number using fixed-point notation, if it has decimals.
JavaScript, String
Converts a number in bytes to a human-readable string.
JavaScript, String
Returns the singular or plural form of the word based on the input number, using an optional dictionary if supplied.