← Back to challenges

Lowercase, Uppercase or Mixed?

JavaScriptHardlanguage_fundamentalsstrings

Instructions

Create a function which returns "upper" if all the letters in a word are uppercase, "lower" if lowercase and "mixed" for any mix of the two.

Examples

getCase("whisper...") ➞ "lower"

getCase("SHOUT!") ➞ "upper"

getCase("Indoor Voice") ➞ "mixed"

Notes

Ignore punctuation, spaces and numbers.

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: City School Creating IDS