how to split an array in javascript

JavaScript
var str = "How are you doing today?";

var res = str.split(" ");
 
Source

Also in JavaScript: