How can I split a string into segments of n characters? How can I split a string into segments of n characters? arrays arrays

How can I split a string into segments of n characters?


var str = 'abcdefghijkl';console.log(str.match(/.{1,3}/g));