Standard built-ins
Intl.ListFormat.prototype.format()
Join iterable strings in original order using locale-specific list pattern.
Formal Syntax & Structure
javascript syntaxjavascript
formatter.format([list])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| list | Iterable<String> | Strings in display order. |
Return Value
String
Localized list.
Working Example
Example Snippetjavascript
console.log(new Intl.ListFormat("en-US",{type:"disjunction"}).format(["x","y"]));