1// our string
2let string = 'ABCDEFG';
3
4// splits every letter in string into an item in our array
5let newArray = string.split('');
6
7console.log(newArray); // OUTPUTS: [ "A", "B", "C", "D", "E", "F", "G" ]
1//split into array of strings.
2var str = "Well, how, are , we , doing, today";
3var res = str.split(",");
1// Designed by shola for shola
2
3str = 'How are you doing today?';
4console.log(str.split(" "));
5
6//try console.log(str.split("")); with no space in the split function
7//try console.log(str.split(",")); with a comma in the split function