Name
Array.toLocaleString( ) — convert an array to a localized string
Availability
JavaScript 1.5; JScript 5.5; ECMAScript v1
Inherits from/Overrides
Overrides Object.toLocaleString( )
Synopsis
array
.toLocaleString( )
Returns
A localized string representation of array
.
Throws
-
TypeError
If this method is invoked on an object that is not an Array.
Description
The toString( )
method of an array returns a
localized string representation of an array. It does this by calling
the toLocaleString( )
method of all of the array
elements, then concatenating the resulting strings using a
locale-specific separator character.
See Also
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.