JSFiddle - React, Tailwind, and code Playground
by Felipe Zura
JavaScript
var myArray = [1,2,3,4,5,6];
// Fastest method, requires the array is in a variable
console.log(myArray[myArray.length - 1]);
by Felipe Zura
var myArray = [1,2,3,4,5,6];
// Fastest method, requires the array is in a variable
console.log(myArray[myArray.length - 1]);