javascript split by charecter code example
Example 1: javascript separate string by char
var Str = "Hello There!"
var SplitOn = " "
var Results = Str.split(SplitOn);
//Results[0] will be 'Hello' and Results[1] will be 'There!'
Example 2: split string to char js
var myString = "split string to char";
var myArray = [...myString];
/*
*
* myArray :
* ["s", "p", "l", "i", "t", " ", "s", "t", "r", "i", "n", "g", " ", "t", "o", " ", "c", "h", "a", "r"]
*
*/