It isn’t that hard of a coding fix.
js: function commentText(count) { return ${count} Comment${count === 1 ? '' : 's'};}
${count} Comment${count === 1 ? '' : 's'}
commentText(1); // "1 Comment"commentText(5); // "5 Comments"
HTML: <span id="comments"></span>
<script> const count = 1; document.getElementById("comments").textContent = count + " Comment" + (count === 1 ? "" : "s");</script>
Python: def comment_text(count): return f"{count} Comment{'s' if count != 1 else ''}"
comment_text(1) # "1 Comment"comment_text(3) # "3 Comments"
int count = 1;string text = $"{count} Comment{(count == 1 ? "" : "s")}";
C#: int count = 1;string text = $"{count} Comment{(count == 1 ? "" : "s")}";
PHP: $count = 1;echo $count . " Comment" . ($count === 1 ? "" : "s");
Logic Form: if count == 1 → "Comment"else → "Comments."
Yup.
Not really… that is Slimes and Magma cubes, and this is losing their AI, not walking in the same direction, and in the video it is not moving only forward (or any other directions)
It isn’t that hard of a coding fix.
js: function commentText(count) {
return
${count} Comment${count === 1 ? '' : 's'};}
commentText(1); // "1 Comment"
commentText(5); // "5 Comments"
HTML: <span id="comments"></span>
<script>
const count = 1;
document.getElementById("comments").textContent =
count + " Comment" + (count === 1 ? "" : "s");
</script>
Python: def comment_text(count):
return f"{count} Comment{'s' if count != 1 else ''}"
comment_text(1) # "1 Comment"
comment_text(3) # "3 Comments"
int count = 1;
string text = $"{count} Comment{(count == 1 ? "" : "s")}";
C#: int count = 1;
string text = $"{count} Comment{(count == 1 ? "" : "s")}";
PHP: $count = 1;
echo $count . " Comment" . ($count === 1 ? "" : "s");
Logic Form: if count == 1 → "Comment"
else → "Comments."