+ 2

How can i document.write () an Array without comma's?

For example: var Arr = ['a','b']; document.write(Arr); Output: a,b; I hope someone can help!

16th Mar 2017, 6:53 AM
Jesse
Jesse - avatar
2 Respuestas
+ 10
I hope this should work : document.write(Arr[0] +Arr[1]);
16th Mar 2017, 7:39 AM
Siddharth Saraf
+ 1
try something like document.write(Arr.join(" and "));
16th Mar 2017, 9:17 PM
marcy learner