Skip to content

Commit

Permalink
Oxford comma
Browse files Browse the repository at this point in the history
  • Loading branch information
herronjo committed Nov 14, 2024
1 parent ba3c65c commit fdb5142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tv/tv.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ window.addEventListener("load", function() {
if (data.typing.length === 1) {
$("#typing").textContent = `${data.typing[0]} is typing...`;
} else if (data.typing.length > 1 && data.typing.length <= 4) {
$("#typing").textContent = `${data.typing.slice(0, -1).join(", ")}, and ${data.typing[data.typing.length - 1]} are typing...`;
$("#typing").textContent = `${data.typing.slice(0, -1).join(", ")}${(data.typing.length > 2) ? "," : ""} and ${data.typing[data.typing.length - 1]} are typing...`;
} else {
$("#typing").textContent = "Several people are typing...";
}
Expand Down

0 comments on commit fdb5142

Please sign in to comment.