// split the text into array of chars using empty string console.log("ABCDEFGHIJK".split('')); // split the text into array of chars using empty string and limit to 3 chars console.log("ABCDEFGHIJK".split('', 3));
console.log("abcd".match(/.{1,2}/g)); // ["ab", "cd"]