Languages
[Edit]
EN

JavaScript - join array of strings by comma and space

0 points
Created by:
troya
692

In this article, we would like to show you how to join an array of strings by comma and space in JavaScript.

Quick solution:

// ONLINE-RUNNER:browser;

var array = ['a', 'b', 'c'];

var text = array.join(', ');

console.log(text); // 'a, b, c'

 

References

  1. Array.prototype.join() - JavaScript | MDN

Alternative titles

  1. JavaScript - join strings in array by comma and space
  2. JavaScript - join strings from array by comma and space
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join