Arrays are one of the most used elements in JavaScript. Today I’m covering 11 arrays methods that will help you work more effectively.
1. join() method : this method joins all the elements of the array and returns a string
2. push() method : this method adds a specific element at the end of the array
3. pop() method : this method removes the last element of an array
4. sort() method: this method arranges all the elements of the array in an ascending of descending way
5. forEach() method: this method goes through the entire array and does something to each element of the array without returning anything
6. map() method: this method is similar to the forEach method but the difference is that this map() method returns a new array after applying something to all the elements of that array
7. slice method (): this method cuts a certain part of an array and returns that part in a new array
8. shift method () : this method removes the first element of an array
9. unshift method (): this method adds an element at the beginning of the array
10. indexOf method (): this method checks for the location of a specific element in the array and returns its position or -1 if the element is not found
11. Find method (): this method goes through the array and tries to find a specific element, if found it returns that element, or that first element that matches the search , if there is no element, it returns undefined .
If you want to know more about arrays and array methods , definitely check this website 👉👉 https://developer.mozilla.org/en-US/d...
Nesta página do site você pode assistir ao vídeo on-line 11 important array methods in JavaScript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Merdi Kim 19 Julho 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 30 vezes e gostou 5 espectadores. Boa visualização!