Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

last element of array

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

console.log(lastElement);

//Output: 16
Source by flexiple.com #
 
PREVIOUS NEXT
Tagged: #element #array
ADD COMMENT
Topic
Name
5+3 =