← Back to challenges

Is the Word Singular or Plural?

JavaScriptHardstringsvalidationconditions

Instructions

Create a function that takes in a word and determines whether or not it is plural. A plural word is one that ends in "s".

Examples

isPlural("changes") ➞ true

isPlural("change") ➞ false

isPlural("dudes") ➞ true

isPlural("magic") ➞ false

Notes

  • Remember that return true (boolean) is not the same as return "true" (string).
  • This is an oversimplification of the English language. We are ignoring edge cases like "goose" and "geese", "fungus" and "fungi", etc.
javascript
Loading editor…
⌘ ↵ to run
Walks through the solution with reasoning and edge cases.