Check if the Same Case

Published by JJCUBER 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.