var myarry = ["abul","babul","rahul"]; var mystring = myarry.join("-"); alert(fullarray2.length); var fullarray = arrayone.concat(arraytwo,arraythree); var alength = fullarray.length; alert(alength); document.write(arrayone.concat(arraytwo,arraythree)); //writes the full array 24. array method concat(): joined array elements to form a new array, property length: returns the length of an object. var arrayone = [1,2,3,4,5]; var arraytwo = [6,7,8]; var arraythree = [9,10,11,12]; var fullarray2 = arrayone.concat(arraythree); //concatenate arrayone and arraythree elements 25. converting an array to a string: the join() method. the methods use a string as a parameter. this parameter is used to separate the array elements. mystring 26. split(): this method is used to turn an string into an array. a parameter is used to separate one element from other. 27. sort() and reverse() method. short and reverse an array document.write("the array before sorting<br />"); var myarray = [3,2,7,4,9,5,6,8]; var n = myarray.length; for(i=0; i<n; i++) document.write(myarray[i]+"<br />"); document.write("the array after sorting <br />"); var shortedarray = myarray.sort(); var mystring = "abul, babul, rahul"; var myarray = mystring.split(","); var n = myarray.length; for(i=0; i<n; i++) document.write(myarray[i]+"<br />"); //myarry turns into string seperated with hyphen (-) and store in document.write(mystring); //alerts the length: 9 //concatenate arrayone arraytwo, and arraythree //returns the length: 12 //shorts the array