#65 Split Strings
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:
solution('abc') // should return ['ab', 'c_']
solution('abcdef') // should return ['ab', 'cd', 'ef']
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #67 Predict your age! (7kyu) (0) | 2018.06.26 |
---|---|
codewars #66 Inside Out Strings (6kyu) (0) | 2018.06.22 |
codewars #64 Strip Comments (4kyu) (0) | 2018.06.20 |
codewars #63 Sort two arrays (5kyu) (0) | 2018.06.19 |
codewars #62 Simple Pig Latin (5kyu) (0) | 2018.06.18 |