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