जावास्क्रिप्ट सरणी के अंतिम तत्व मिलता है
var foods = ["kiwi","apple","banana"];
var banana = foods[foods.length - 1]; // Getting last element
जावास्क्रिप्ट सरणी के अंतिम तत्व मिलता है
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"
सरणी का अंतिम तत्व कैसे प्राप्त करें
return array[array.length - 1];
जावास्क्रिप्ट सरणी में अंतिम तत्व मिलता है
//im here because the ad
const lastItem = colors[colors.length - 1]
सरणी जावास्क्रिप्ट का अंतिम तत्व प्राप्त करें
let colors = ["red", "yellow", "green"];
let lastELement = colors[colors.length - 1]
कैसे प्राप्त करने के लिए पिछले तत्व की एक सरणी
import _ from 'lodash';
let array = [ 1, 2, 3 ];
_.last(array); // 3