Simply like that:
arr.join("")
Answer from VisioN on Stack OverflowWhen you call join without any argument being passed, ,(comma) is taken as default and toString internally calls join without any argument being passed.
So, pass your own separator.
var str = array.join(' '); //'apple tree'
// separator ---------^
MDN on Array.join
pass a delimiter in to join.
['apple', 'tree'].join(' '); // 'apple tree'
You can simple use the Array.prototype.join function
const A = [ '6', '6', '.', '5' ];
console.log(A.join(''));
As explain on the Documentation page of Array.prototype.join
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. If the array has only one item, then that item will be returned without using the separator.
It can take as parameter the separator which will be use to separate element from the array when they are joined.
let list = ["a", "b", "c", "d"];
list.join("-"); // will return "a-b-c-d"
list.join("/"); // will return "a/b/c/d"
list.join(""); // will return "abcd"
By default the separator is ,. This means if you don't specify which character will be use as the separator it will use the , character
list.join(); // will return a,b,c,d
console.log(['6', '6', '.', '5'].join(''));