Settings

Code Theme

Theme for code blocks: OceanicNext/Github

Theme

Page theme

Toggle to hide or show Browser Details/Support

Change the color of the accent (default: purple)

Disable to stop screen reader from announcing playground output on input change

Language for page. Press Confirm to reload page with selected language

Confirm language

Intl.ListFormat

Input


Alternativ use

Intl.ListFormat can also be used from Array.prototype.toLocaleString()
["Miso", "Sesam", "Mami"]
.toLocaleString(undefined)
Miso, Sesam, and Mami

Output


type

{
type: "conjunction"
}
Miso, Sesam, and Mami
{
type: "disjunction"
}
Miso, Sesam, or Mami
{
type: "unit"
}
Miso, Sesam, Mami

style

{
style: "long"
}
Miso, Sesam, and Mami
{
style: "short"
}
Miso, Sesam, & Mami
{
style: "narrow"
}
Miso, Sesam, Mami

localeMatcher

{
localeMatcher: "best fit"
}
Miso, Sesam, and Mami
{
localeMatcher: "lookup"
}
Miso, Sesam, and Mami

conjunction + style

{
type: "conjunction",
style: "long"
}
Miso, Sesam, and Mami
{
type: "conjunction",
style: "short"
}
Miso, Sesam, & Mami
{
type: "conjunction",
style: "narrow"
}
Miso, Sesam, Mami

disjunction + style

{
type: "disjunction",
style: "long"
}
Miso, Sesam, or Mami
{
type: "disjunction",
style: "short"
}
Miso, Sesam, or Mami
{
type: "disjunction",
style: "narrow"
}
Miso, Sesam, or Mami

unit + style

{
type: "unit",
style: "long"
}
Miso, Sesam, Mami
{
type: "unit",
style: "short"
}
Miso, Sesam, Mami
{
type: "unit",
style: "narrow"
}
Miso Sesam Mami