new Intl.ListFormat(locales, options) builds a formatter that turns an array of strings into one list phrase. English conjunction style becomes "A, B, and C".
Set type to "conjunction" (and), "disjunction" (or), or "unit" (no and/or).
Remember
new Intl.ListFormat(locales, options)
fmt.format(["A", "B", "C"])
type: "conjunction" → and
type: "disjunction" → or
type: "unit" → no and/or
Syntax
Create a ListFormat, then pass an array of strings to format.
JavaScript
const fmt = new Intl.ListFormat("en");
console.log(fmt.format(["A", "B", "C"]));
Call
What it does
new Intl.ListFormat("en")
English list with "and" (conjunction).
fmt.format(["A", "B", "C"])
Returns "A, B, and C" in English.
{ type: "disjunction" }
Uses "or" instead of "and".
{ type: "unit" }
Joins items without and/or, useful for measurements.
The Try It page first checks that Intl.ListFormat exists, because it may be missing in older browsers. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.
How It Works
Default type. Conjunction adds the locale word for "and".
German und. The same array becomes A, B und C.
Array in. Pass any list of strings you already prepared.
The Try It page first checks that Intl.ListFormat exists, because it may be missing in older browsers. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.
How It Works
type disjunction. Tells the formatter to use "or".
Choices. Useful for menus: red, green, or blue.
Same array API. Only the connecting word changes.
Example 3 — Join Measurement Parts
Unit type joins values without and/or, good for lengths and similar pairs.
The Try It page first checks that Intl.ListFormat exists, because it may be missing in older browsers. In an older browser it prints a short explanation and the output above. In current browsers it runs the code for real.
How It Works
No and/or. Unit style is for measurement-like sequences.
You supply units. The strings already include ft and in.
Clean join. The formatter only adds the locale list separators.
Compatibility
Browser & Runtime Support
Intl.ListFormat is part of ES2018. Current browsers and Node.js 12+ support it.
✓ ES2018 · Widely supported
Intl.ListFormat
Supported in Chrome 72+, Edge 79+, Firefox 78+, Safari 14.1+, Opera 60+ and Node.js 12+.
ES2018Standard since
Google Chrome72+ · Desktop & Mobile
Full support
Microsoft Edge79+ · Chromium based
Full support
Mozilla Firefox78+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Opera60+ · Chromium based
Full support
Samsung InternetRecent versions · Android
Supported
Android WebView72+ · Chromium based
Supported
Node.js12+ · Server runtime
Supported
DenoSupported · JavaScript runtime
Supported
BunSupported · JavaScript runtime
Supported
Internet ExplorerNo native support
Not supported
Intl.ListFormatExcellent
Bottom line: Safe in current browsers. Guard with typeof Intl.ListFormat === "function" if you need older Safari or Firefox.
Frequently Asked Questions
It turns an array of strings into one localized list phrase, with the correct separators and and/or word for the locale.
Conjunction uses and (A, B, and C). Disjunction uses or (A, B, or C).
When items are measurement-like parts that should not get and/or, such as 3 ft, 2 in.
No. It only joins the strings you give it. Translate or format each item first.
On older browsers, yes. Check typeof Intl.ListFormat === "function".