So, you can use an array for storing and retrieving data. The retrieving process by
 calls indexing.
But there are different methods for working with an array.
There are different ways to add an element to an array.
push() method adds a new value to the end of the array:
unshift() method works like the
push() method, but it inserts the value at the beginning of the array.
You can append a new value by indexing:
You can use indexing to assign a value to a specified index, reassign a previous value, etc:
To create a new element in the array without mistakes, you need to use the
push(value) method or
arr[arr.length] = value expression:
Sometimes you may need to delete array elements. This can be done in different ways. Now I will describe some of them.
pop() method deletes the last element in an array, and you can save it to another variable:
shift() method works like the
pop() method, but cuts the first element from an array:
How to add an element to the end of the array?
Select a few correct answers
How to remove the last element in the array?
Select the correct answer