Open this example in the interactive library
Source code
console.log(
new Intl.ListFormat("en-US", { type: "conjunction" }).format([
"HTML",
"CSS",
"JavaScript",
]),
);
Sample output
HTML, CSS, and JavaScript

Open this example in the interactive library
console.log(
new Intl.ListFormat("en-US", { type: "conjunction" }).format([
"HTML",
"CSS",
"JavaScript",
]),
);
HTML, CSS, and JavaScript