Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to find last element of an array

let arry = [2, 4, 6, 8, 10, 12, 14, 16];
let lastElement = arry[arry.length - 1];

console.log(lastElement);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #element #array
ADD COMMENT
Topic
Name
6+6 =