The Array.prototype.join() method:

var arr = ["Zero", "One", "Two"];

document.write(arr.join(", "));

Answer from Wayne on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › create-a-comma-separated-list-from-an-array-in-javascript
Create a Comma Separated List from an Array in JavaScript - GeeksforGeeks
July 11, 2025 - The code uses map(String) to convert each element of the array arr into a string, and then join(',') joins these string elements with commas. The result is a comma-separated string "1,2,3,4,5", which is logged to the console.
Discussions

How do I convert an array to a string with commas in JavaScript
...you get a better, more thorough explanation here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join More on reddit.com
🌐 r/JavaScriptTips
1
4
April 13, 2023
How to convert array into comma separated string in javascript - Stack Overflow
I have an array: a.value = [a,b,c,d,e,f] How can I convert to comma-seperated string like: a.value = "a,b,c,d,e,f" More on stackoverflow.com
🌐 stackoverflow.com
Convert list to comma separated string
I currently have a list of addresses in my database formatted in a column and I would like to convert it into a comma-separated string so that I can call upon it for my Map app formatted like the following (without brackets): [address 1],[address 2],[address 3] This is what I currently have ... More on forum.bubble.io
🌐 forum.bubble.io
5
2
September 6, 2020
javascript - Create comma-delimited string - Stack Overflow
I'm looking to find a neat way to create a comma-delimited string from an array. This is how I'm doing it now... for(i=0;i More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reddit
reddit.com › r/javascripttips › how do i convert an array to a string with commas in javascript
r/JavaScriptTips on Reddit: How do I convert an array to a string with commas in JavaScript
April 13, 2023 -

In JavaScript, you can convert an array to a string with commas using the join()
method.

The join() method returns a string that concatenates all the elements of an array, separated by the specified separator, which in this case is a comma.

Here is an example:

const array = ['apple', 'banana', 'orange'];
const string = array.join(', ');
console.log(string); 

// output: "apple, banana, orange"

In this example, we first define an array of three fruits. Then we use the join()
method with a comma and a space as the separator to create a string that lists all the fruits with a comma and a space between each one.

You can replace the comma and space separator with any other separator you like, such as a hyphen, a semicolon, or a newline character.

It's important to note that the join() method only works on arrays, and it will throw an error if you try to use it on any other type of object.

Click here to learn more ways to Convert Array to String with Commas in JS

🌐
Medium
medium.com › coding-at-dawn › how-to-convert-an-array-to-a-string-with-commas-in-javascript-79e212506c2
How to Convert an Array to a String with Commas in JavaScript | by Dr. Derek Austin 🥳 | Coding at Dawn | Medium
January 5, 2023 - That means it’s easy to turn ... character (,) to appear as the separator between items in the list, use .join(",") to convert the array to a string....
🌐
TutorialsPoint
tutorialspoint.com › article › how-to-turn-javascript-array-into-the-comma-separated-list
How to turn JavaScript array into the comma-separated list?
March 15, 2026 - The toString() method simply converts all the elements of the array into a string and then return that string in the form of a comma-separated list which contains all the elements that contained by the original array.
🌐
Bubble
forum.bubble.io › questions
Convert list to comma separated string - Questions - Bubble Forum
September 6, 2020 - I currently have a list of addresses in my database formatted in a column and I would like to convert it into a comma-separated string so that I can call upon it for my Map app formatted like the following (without brackets): [address 1],[address 2],[address 3] This is what I currently have ...
Find elsewhere
🌐
Josequinto
blog.josequinto.com › 2017 › 03 › 17 › how-to-convert-array-of-objects-into-comma-separated-string-extracting-only-one-property
How to Convert Array of Objects into Comma Separated String extracting only one property | José Quinto
March 17, 2017 - How to Convert Array of Objects into Comma Separated String extracting only one property · 2017-03-17|How-ToQuick-NoteCode-Reminder| I’d like to share a quick solution which always is really useful when you are handling complex object-type data structures in JavaScript / ES6 / TypeScript.
🌐
GeeksforGeeks
geeksforgeeks.org › convert-comma-separated-string-to-array-using-javascript
JavaScript – Convert Comma Separated String To Array | GeeksforGeeks
November 26, 2024 - In JavaScript, converting an array to a string involves combining its elements into a single text output, often separated by a specified delimiter. This is useful for displaying array contents in a readable format or when storing data as a single string. The process can be customized to use differen ... Making a comma-separated string from a list of strings consists of combining the elements of the list into a single string with commas between each element.
🌐
Medium
medium.com › @setyawan_asep › how-to-convert-array-of-objects-into-comma-separated-string-extracting-only-one-property-ff26cfcad00e
How to Convert Array of Objects into Comma Separated String extracting only one property | by asep setyawan | Medium
March 8, 2018 - How to Convert Array of Objects into Comma Separated String extracting only one property I’d like to share a quick solution which always is really useful when you are handling complex object-type …
Top answer
1 of 3
1
One would 1st call the string's · split · method: · var list = ' item 1, item 2 , ,item 3 '; · var array = list · .split(','); · gs.debug('\n[' + array.join(']\n[') + ']'); · This prints: · *** Script: [DEBUG] · [ item 1] · [ item 2 ] · [ ] · [item 3 ] · Pretty all over the place. · For better result - where the leading and trailing spaces are removed - one would use · trim · before splitting: · var list = ' item 1, item 2 , ,item 3 '; · var array = list · .trim() · .split(','); · gs.debug('\n[' + array.join(']\n[') + ']'); · *** Script: [DEBUG] · [item 1] · [ item 2 ] · [ ] · [item 3] · Really only slightly better - only the 1st and the last items look good - and half of both only by chance (the one who entered the list did not add extra spaces after the last item and before the 1st one). · To take care of all extra spaces for all items that could exist due to sloppy fellow programmers composing the list or faulty data entry, one would switch the splitter to · RegExp · : · var list = ' item 1, item 2 , ,item 3 '; · var array = list · .trim() · .split(/\s*,\s*/g); · gs.debug('\n[' + array.join(']\n[') + ']'); · *** Script: [DEBUG] · [item 1] · [item 2] · [] · [item 3] · A lot better, almost there, just one problem remains: the 3rd item which is empty. · To take care of that problem one might · filter · the resulting array: · var list = ' item 1, item 2 , ,item 3 '; · var array = list · .trim() · .split(/\s*,\s*/g) · .filter(retainNotEmpty); · function retainNotEmpty (item) { · return '' != item; · } · gs.debug('\n[' + array.join(']\n[') + ']');​ · *** Script: [DEBUG] · [item 1] · [item 2] · [item 3] · Just about what one desires. · Filtering will also fix the issue of empty string ending up (not in a 0 length array, but) in an array with one item when split.
2 of 3
0
Hi @hardikbendre , · Please use the below to convert comma separated value into an array: · // dec stores the comma separated values · var dec = "service,now,community" · var colSplit = dec.split(","); · var arr=[]; · for(i=0;i
🌐
Make Community
community.make.com › questions
Create comma separated string from array - Questions - Make Community
March 24, 2024 - Hi all, I have a HTTP module that returns an array of collections with values including a name, description and number. Rough response is: items: [ { name: name 1, description: description1, number: number 1 }, { name: name 2, description: description2, number: number 2 }, { name: name 3, description: description3, number: number 3 }, ] I want to extract those values for each collection and create a comma separated string in the format of name1 | description1 | number1, name2...
🌐
W3docs
w3docs.com › javascript
How to Convert a Comma-Separated String into Array
Use a comma separator in the first argument of the split method if you want to split it by comma: ... Use the limit parameter to split a string into an array and also get the individual name.
🌐
UiPath Community
forum.uipath.com › learning hub › academy feedback
Convert a list to comma separated string without loop - Academy Feedback - UiPath Community Forum
May 29, 2019 - I have a list with string values. I want to store all values from my list to a variable with comma separated without using loop. Thanks!
🌐
n8n
community.n8n.io › questions
How to convert a comma-delim list to an array? - Questions - n8n Community
April 12, 2024 - Hi, this is my first post here. Apologies if this is super-basic but I’m struggling with converting a simple comma-delimited list to an array object. What I have now: 1646695954382x973842455138163000,1646695991193x16025…