how to split a string after specific characters in javascript code example
Example: split a string every n characters javascript
console.log("abcd".match(/.{1,2}/g)); // ["ab", "cd"]
console.log("abcd".match(/.{1,2}/g)); // ["ab", "cd"]