How to get the primitive value of an array in JavaScript

1 Answer

0 votes
var arr = ["java", "python", "javascript", "c#", "c", "c++"];

var s = arr.valueOf(); 

document.write(s);

/*

run:

java,python,javascript,c#,c,c++ 

*/

 



answered Apr 9, 2017 by avibootz
...