JavaScript: The Definitive Guide

24.17. Array.toLocaleString( ): convert an array to a localized string

ECMAScript v1: Overrides Object.toLocaleString( )

24.17.1. Synopsis

array.toLocaleString( )

24.17.1.1. Returns

A localized string representation of array.

24.17.1.2. Throws

TypeError

If this method is invoked on an object that is not an Array.

24.17.2. Description

The toLocaleString( ) 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.

24.17.3. See Also

Array.toString( ), Object.toLocaleString( )

Категории