javascript split text every n characters but don't split words appart code example
Example: split every n character js
var str = 'abcdefghijkl';
console.log(str.match(/.{1,3}/g));
var str = 'abcdefghijkl';
console.log(str.match(/.{1,3}/g));