Skip to main content
1 of 5
zzzzBov
  • 1.8k
  • 2
  • 17
  • 25

Plurals and possessives of quoted words

After asking a number of questions on StackOverflow, I keep running into some of the same phrasing issues. Typically these issues stem from variable names.

###How do I correctly pluralize or possessivize* a word or phrase in quotes or code blocks? Are there any differences in grammatical structure if <code> blocks, or ` characters are used to delineate quoted words, phrases, or variables instead?

* I don't know the right word for "possessivize" either; anyone who would like to correct it can be my guest

As a simple example that involves some basic JavaScript code:

var chars, char;
chars = 'abcdefghijklmnopqrstuvwxyz'.split('');
chars.forEach(function (char, index, chars) {
  console.log(index, char, char.length);
});
console.log(char);

Possessive

within the callback, char's length should always be 1.
-or-
within the callback, "char"'s length should always be 1.

Plural

chars are defined in multiple scopes
-or-
"char"s are defined in multiple scopes

I'm aware that these aren't the best of examples, as I would typically write "char instances" instead of "chars", but I couldn't come up with a better example at the moment. The general idea still stands.

zzzzBov
  • 1.8k
  • 2
  • 17
  • 25