Разделите и присоединяйтесь к узлу JS
var str = "How are you doing today?";
var res = str.split(" ");
var join = res.join(",");
Embarrassed Echidna
var str = "How are you doing today?";
var res = str.split(" ");
var join = res.join(",");