Home / Javascript Tips Generated By ChatGPT / Splitting a String into an Array in Javascript Use split to divide a string into an array of substrings. Source Code let words = 'apple, banana, cherry'; console.log(words.split(', '));