var array_result=my_array.unshift("Kohli"); { country[2] = "Srilanka"; } If we want to use anything which acts as a multidimensional array then we need to create a multidimensional array by using another one-dimensional array. var my_array=["England","Australia","India"]; The object Array allows you to store various values in one variable. variable. Sorry for the verbose title - sometimes things can be explained better with a code example. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS. The sort() method is used to display the array elements in ascending order. An array is a special kind of object. You will be performing a certain test on an original array and the elements that pass this test will be returned to the new array using this method. Converting … The literal notation array makes it simple to create arrays in JavaScript. It comprises of two square brackets that wrap optional, comma-separated array elements. It returns true if condition matches given condition otherwise returns false. object. var num = [10, 20, 30]; 2. They are widely used in modern Javascript to copy data also. document.getElementById("myarray").innerHTML = my_array; document.writeln("Remaining elements of array: "+ my_array); For typed arrays, the constructor dictates what the format is. var num; This statement changes the value of the first element in cars: With JavaScript, the full array can be accessed by referring to the array document.write("Concatenated Result : " + concat_res ); But sometimes we need an ordered collection, where we have to store 1st, 2nd, 3rd element and many more. var array_result=my_array.slice(2,3); }