Reverse the Case

Published by Helen Yu in

Given a string, create a function to reverse the case. All lower-cased letters should be upper-cased, and vice versa.

Examples

reverseCase("Happy Birthday") ➞ "hAPPY bIRTHDAY"

reverseCase("MANY THANKS") ➞ "many thanks"

reverseCase("sPoNtAnEoUs") ➞ "SpOnTaNeOuS"

Notes

N/A

Watch a quick demo on how Edabit works.