JavaScript split string menjadi array dengan koma dan ruang

input.split(/[ ,]+/); //splits string using RegEx on a space OR a comma
Powerful Penguin