Javascript
![javascript & jquery pdf javascript & jquery pdf](https://www.pierre-giraud.com/wp-content/uploads/2019/12/javascript-livre-couverture.jpg)
adding a new element on the 0 indexes and moving all the other elements to their right.Įmployee.unshift() This method is used to shift array to the right i.e. removing the first element of the array and moving the other elements to their left. This method is used to shift array to the left i.e. If the element is not present then it will return -1. This method is used to find the index of the first occurrence of the particular element in the array. The output of this method is making the last index element to first and first index element to the last. This method is used to reverse the array elements. The Sort method will also change the order of the array permanently. This method is used to sort the array elements alphabetically or in the numeric order given whichever type of array is passed. This will eventually result in the array length increased by 1. This method is used to insert an element in the array at the last index of the array. The easiest way to define a Multi-Dimensional Array in JavaScript is to use the array literal notation. the array will be consisting of other arrays as elements. However, we can create a multidimensional array in JavaScript by making an array of arrays i.e. This will eventually result in the array length decreased by 1. Natively, JavaScript does not provide multidimensional arrays or any syntax of them. This method is used to remove the element at the last index of the array. length: This Function will return the length of the array passed.ĭ.length // 3 Top 8 Methods in Multi-Dimensional Array in JavaScriptīelow are the methods used in Multi-Dimensional Array in JavaScript: 1. typeof: This operator is used to find the type of object passed.ģ.