javascript aget last element of an aray code example
Example: find last element in array javascript
var heroes = ["Batman", "Superman", "Hulk"];
var lastHero = heroes.pop(); // Returns last elment of the Array
// lastHero = "Hulk"
var heroes = ["Batman", "Superman", "Hulk"];
var lastHero = heroes.pop(); // Returns last elment of the Array
// lastHero = "Hulk"