Lowercase, Uppercase or Mixed?

Published by Mubashir Hassan in

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.

Watch a quick demo on how Edabit works.