Categories
JavaScript Answers

How to convert array into string without comma and separated by space in JavaScript without concatenation?

Spread the love

To convert array into string without comma and separated by space in JavaScript without concatenation, we call the join method.

For instance, we write

const str = array.join(" ");

to call array.join with a space as the separator to return a string with the items in array joined together.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *