| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
toLocaleString() Array
.
toLocaleString , (",")
.
const array1 = [1, "a", new Date("21 Dec 1997 14:12:00 UTC")];
const localeString = array1.toLocaleString("en", { timeZone: "UTC" });
console.log(localeString);
// : "1,a,12/21/1997, 2:12:00 PM",
// "en" UTC . .
toLocaleString()
toLocaleString(locales)
toLocaleString(locales, options)
locales OptionalBCP 47 . locales Intl .
options Optional.
Array.prototype.toLocaleString locales options toLocaleString . . , toLocaleString() . locales .
undefined, null, "null" "undefined" .
toLocaleString() . this length .
toLocaleString . , prices Number.prototype.toLocaleString() .
const prices = ["7", 500, 8123, 12];
prices.toLocaleString("ja-JP", { style: "currency", currency: "JPY" });
// "7,500,8,123,12"
toLocaleString() undefined .
console.log([1, , 3].toLocaleString()); // '1,,3'
toLocaleString() this length length .
const arrayLike = {
length: 3,
0: 1,
1: 2,
2: 3,
3: 4, // length 3 toLocaleString()
};
console.log(Array.prototype.toLocaleString.call(arrayLike));
// 1,2,3
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-array.prototype.tolocalestring |
| ECMAScript 2027 Internationalization API Specification # sup-array.prototype.tolocalestring |
ArrayArray.prototype.toString()TypedArray.prototype.toLocaleString()IntlIntl.ListFormatObject.prototype.toLocaleString()Number.prototype.toLocaleString()Temporal.PlainDate.prototype.toLocaleString()This page was last modified on 2025 10 10 by MDN contributors.
Arrayat()concat()copyWithin()entries()every()fill()filter()find()findIndex()findLast()findLastIndex()flat()flatMap()forEach()includes()indexOf()join()keys()lastIndexOf()map()pop()push()reduce()reduceRight()reverse()shift()slice()some()sort()splice()toLocaleString()toReversed()toSorted()toSpliced()toString()unshift()values()with()[Symbol.iterator]()Object/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |