Listas

Formatação de lista no modo conjuntivo ("e"), desjuntivo ("ou") e unidade

const list = ['Macarrão', 'Alho', 'Oléo'];

// Conjuntivo
new Intl.ListFormat('pt-BR', { style: 'long', type: 'conjunction' }).format(list);
// Macarrão, Alho e Oléo

// Desjuntivo
console.log(new Intl.ListFormat('pt-BR', { style: 'long', type: 'disjunction' }).format(list));
// Macarrão, Alho ou Oléo

// Unidade
console.log(new Intl.ListFormat('pt-BR', { style: 'narrow', type: 'unit' }).format(list));
// Macarrão Alho Oléo