Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

merge two strings with alternate characters javascript

var m = (a, b) => a.length ? [a[0], ...m(b, a.slice(1))] : b;
var string1 = "SCE ESG!";
var string2 = "ERTMSAE";
var mix = m(string1, string2);

console.log(mix.join(''));
 
PREVIOUS NEXT
Tagged: #merge #strings #alternate #characters #javascript
ADD COMMENT
Topic
Name
6+7 =