It return a string representing the elements of the array.
Input: var name = "gfg"; var number = 123; var A = [ name, number ]; Output: > "gfg, 123"
Here as we see that in input there are two variables containing elements but in output these are converted into a string.
> "geeksforgeeks, 567, 2/18/2018, 10:41:20 AM"
> "Ram, Sheeta, Geeta, 3.45, 23, 34, 54"
- Google Chrome 1 and above
- Internet Explorer 5.5 and above
- Firefox 1 and above
- Opera 4 and above
- Safari 1 and above