Array
IT Notes → Javascript @ December 22, 2020
- To access an element, we can use obj.member or obj[index].
- The push method adds an element to the end of an array.
- The pop method removes the items from the end of the array first.
- The shift method removes elements from the top of the array, which does suit our needs.
- The unshift method adds items to the top of an array.
- array.splice(index, howmany, element1, .., elementX).
Subscribe
Login
0 Comments