How to remove first and last element in an array?
For example:
var fruits = [\"Banana\", \"Orange\", \"Apple\", \"Mango\"];
Expecte
fruits.shift(); // Removes the first element from an array and returns only that element. fruits.pop(); // Removes the last element from an array and returns only that element.
See all methods for an Array.