There is an elegant way to split a string into an array based on the example:
var x = "FAT* FAT32*";
And that it results in something like this:
x = "FAT*"; x = "FAT32*";
Yes there is, it's using
var x = "FAT* FAT32*"; var array = x.split(" "); console.log(array); console.log(array);
I put it on GitHub for future reference .