Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using .join method to convert array to string without commas [duplicate]

Simply like that:

arr.join("")

You can specify an empty string as an argument to join, if no argument is specified a comma is used.

 arr.join('');

http://jsfiddle.net/mowglisanu/CVr25/1/


The .join() method has a parameter for the separator string. If you want it to be empty instead of the default comma, use

arr.join("");

All you need to do is :

arr.join('');

FIDDLE