how to check if the element is the last element of the array code example
Example 1: find last element in array javascript
var heroes = ["Batman", "Superman", "Hulk"];
var lastHero = heroes.pop(); // Returns last elment of the Array
// lastHero = "Hulk"
Example 2: how to find the last element in an array
hello everybody