Arrays are versatile for storing and retrieving data. Retrieving data using square brackets
 is called indexing.
However, there are various methods available for working with arrays.
There are different ways to add elements 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:
Indexing allows you to assign a value to a specified index, reassign a previous value, and more:
To create a new element in the array without mistakes, you can use the
push(value) method or the
arr[arr.length] = value expression:
Sometimes, you may need to delete elements from an array. This can be done in different ways.
pop() method deletes the last element in an array and allows you to save it to another variable:
shift() method works like
pop(), but it removes the first element from an array:
How can we add an element to the end of the array?
Select a few correct answers
How can we remove the last element in the array?
Select the correct answer
Everything was clear?