Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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);
 
PREVIOUS NEXT
Tagged: #find #element #array
ADD COMMENT
Topic
Name
5+3 =