Skip to content

Latest commit

 

History

History

alternateCapitalization

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Alternate capitalization

7 kyu link to kata
my solution

Given a string, capitalize the letters that occupy even indexes and odd indexes separately, and return as shown below. Index 0 will be considered even.

For example, capitalize("abcdef") = ['AbCdEf', 'aBcDeF']. See test cases for more examples.

The input will be a lowercase string with no spaces.

Good luck!