Remove comment

This commit is contained in:
mike12345567 2025-02-26 13:41:45 +00:00
parent 184a656f71
commit 1d35f2a029
1 changed files with 0 additions and 1 deletions

View File

@ -2,6 +2,5 @@ export function punctuateList(list: string[]) {
if (list.length === 0) return ""
if (list.length === 1) return list[0]
if (list.length === 2) return list.join(" and ")
// For more than 2 elements: join all but the last with commas, then add "and" before the last element.
return list.slice(0, -1).join(", ") + " and " + list[list.length - 1]
}