The Array.prototype.join() method:

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

document.write(arr.join(", "));
Run code snippetEdit code snippet Hide Results Copy to answer Expand

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
javascript - How to convert object array to comma separated string? - Stack Overflow
Im trying to convert at object array with jQuery or javascript to a comma separated string, and no matter what I try I can´t get it right. I have this from a select value. ort = $('#ort').val(); ... More on stackoverflow.com
🌐 stackoverflow.com
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
🌐
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 - “The join() method creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas or a specified separator string.” — MDN Docs
🌐
YouTube
youtube.com › watch
How to Convert Array of Objects into Comma Separated String in JavaScript - YouTube
In JavaScript, you may encounter scenarios where you need to convert an array of objects into a comma-separated string. This video tutorial will guide you th...
Published   December 19, 2023
🌐
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 › @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 - 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. That code will be useful when you want to extract some property values from an array of objects.
Find elsewhere
🌐
W3Resource
w3resource.com › javascript-exercises › fundamental › javascript-fundamental-exercise-5.php
JavaScript fundamental (ES6 Syntax): Convert an array of objects to a comma-separated values (CSV) string that contains only the columns specified - w3resource
July 3, 2025 - Use Array.prototype.join('\n') to combine all rows into a string. Omit the third argument, delimiter, to use a default delimiter of,. ... // Source: https://bit.ly/2neWfJ2 // Define a function called `JSON_to_CSV` that converts JSON data to ...
🌐
CoreUI
coreui.io › answers › how-to-convert-an-array-to-a-string-in-javascript
How to convert an array to a string in JavaScript · CoreUI
May 19, 2026 - Use the join() method to convert an array into a string with a specified separator.
🌐
Vultr Docs
docs.vultr.com › javascript › standard-library › Array › toString
JavaScript Array toString() - Convert Array to String | Vultr Docs
September 27, 2024 - Note that while primitive types are converted to their string equivalents, objects are represented as "[object Object]". The toString() method in JavaScript is a versatile function that converts arrays into readable, comma-separated strings.
🌐
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.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › join
Array.prototype.join() - JavaScript - MDN Web Docs
The join() method of Array instances creates and returns a new string by concatenating all of the elements in this array, separated by commas or a specified separator string. If the array has only one item, then that item will be returned without using the separator.
🌐
SourceFreeze
sourcefreeze.com › home › how to convert array to comma separated strings in javascript
How to convert array to comma separated strings in javascript
March 21, 2023 - Please refer to the below example here we have passed the arrValue=[“javascript”,”typescript”,”react”,”angular”] to the String object, then the String object will return the values as comma separated output like ‘javascrip...
🌐
TutorialsPoint
tutorialspoint.com › article › How-to-turn-JavaScript-array-into-the-comma-separated-list
How to turn JavaScript array into the comma-separated list?
November 25, 2022 - ... The join() method joins all the elements of an array and forms a string and returns it later by separating every element with the specified separator passed to the method in form of a string.
🌐
ServiceNow Community
servicenow.com › community › developer-forum › convert-array-string-to-comma-separated-string › m-p › 2606171
Convert Array String to Comma Separated String - ServiceNow Community
July 6, 2023 - Hi, I suspect your issue is that your array is an array of objects, and so may need to iterate through the sorted array stringifying each element\object and concatenating these individually to your output string.
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-convert-array-to-comma-separated-string
Convert Array to String (with and without Commas) in JS | bobbyhadz
The Array.join() method will return a string where all of the array elements are joined with a comma separator.