जावास्क्रिप्ट सरणी के अंतिम तत्व मिलता है
var colors = ["red","blue","green"];
var green = colors[colors.length - 1];//get last item in the array
जावास्क्रिप्ट सरणी में अंतिम आइटम मिलता है
var colors = ["red","blue","green"];
var green = colors[colors.length - 1]; //get last item in the array
जेएस सरणी में अंतिम आइटम लेते हैं
const heroes = ["Batman", "Superman", "Hulk"];
const lastHero = heroes.pop(); // Returns last elment of the Array
// lastHero = "Hulk"
जावास्क्रिप्ट सरणी के अंतिम तत्व ले
let array = [1,2,3,4,5];
let lastElement = array.pop();
// array -> [1,2,3,4];
// lastElement = 5;