Use of Array.toString() method in Javascript.

Posted by Rajesh_Kumar under JavaScript category on | Points: 40 | Views : 1085
The toString method Joins the array and returns one string containing each array element separated by commas.

function array_join_with_toString_method() 
var array_names = new Array(6);
array_names[0] = "Rajesh";
array_names[1] = "Kumar";
array_names[2] = "Sathua";
array_names[3] = "Vipin";
array_names[4] = "Seema";
array_names[5] = "Vinita";

var array_items = array_names.toString();

Comments or Responses

Login to post response