CodeWars || Split Strings || JavaScript || Code Challenge

Published: 04 January 2021
on channel: Iuliia Saprykina
3,154
46

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']


On this page of the site you can watch the video online CodeWars || Split Strings || JavaScript || Code Challenge with a duration of hours minute second in good quality, which was uploaded by the user Iuliia Saprykina 04 January 2021, share the link with friends and acquaintances, this video has already been watched 3,154 times on youtube and it was liked by 46 viewers. Enjoy your viewing!