Skip to content

Latest commit

 

History

History

splitStrings

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Split Strings

6 kyu link to kata
my solution

Complete the solution so that it splits the string into pairs of two characters. If the string contains an odd number of characters then it should replace the missing second character of the final pair with an underscore ('_').

Examples:

* 'abc' =>  ['ab', 'c_']
* 'abcdef' => ['ab', 'cd', 'ef']