javascript split all characters code example
Example 1: js string to array
str = 'How are you doing today?';
console.log(str.split(' '));
>> (5) ["How", "are", "you", "doing", "today?"]
Example 2: split a string every n characters javascript
console.log("abcd".match(/.{1,2}/g)); // ["ab", "cd"]
Example 3: js string to array
var myString = 'no,u';
var MyArray = myString.split(',');//splits the text up in chunks