Challenge 46
🔠🔡
ToGgLe CaSe
Create a function that takes a string parameter and outputs the toggle/alternate case version of it
Examples:
toggleCase("I like to type like this") would return "I lIkE tO TyPe LiKe ThIS"
toggleCase("abcde") would return "AbCdE"
Extension:
Have the function take an additional parameter, which allows the user to specify whether the returned sequence should start with an uppercase or lowercase letter - i.e. if lowercase is chosen, the returned string would be aBcDe as opposed to AbCdE