JavaScript array.toLocaleString() Function

JavaScript Logo

array.toLocaleString() – Returns a locale-sensitive string representing the elements of the array.

๐Ÿ‘‰ Syntax

str = array.toLocaleString(locales, options);

๐Ÿงช Example

[123456.789].toLocaleString('de-DE'); // '123.456,789'

Comments