how to split a sentence into words in javascript and keep the spaces code example
Example: js split text on spaces
var string = "text to split";
var words = string.split(" ");
var string = "text to split";
var words = string.split(" ");