1var foods = ["kiwi","apple","banana"];
2var banana = foods[foods.length - 1]; // Getting last element
1var heroes = ["Batman", "Superman", "Hulk"];
2var lastHero = heroes.pop(); // Returns last elment of the Array
3// lastHero = "Hulk"
1const colors = ['red', 'yellow', 'green', 'blue']
2const lastItem = colors[colors.length - 1]
3console.log(lastItem)