var fruits = 'apple, orange, pear, banana, raspberry, peach'; var ar = fruits.split(', '); // split string on comma space console.log( ar ); // [ "apple", "orange", "pear", "banana", "raspberry", "peach" ]