Check if the Same Case

Published by Pickle in

Create a function that returns true if an input string contains only uppercase or only lowercase letters.

Examples

SameCase("hello") ➞ true

SameCase("HELLO") ➞ true

SameCase("Hello") ➞ false

SameCase("ketcHUp") ➞ false

Notes

N/A

Watch a quick demo on how Edabit works.