Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array last element get

const arr = [1, 2, 3, 4];
const lastElement = arr[arr.length - 1];
console.log(lastElement);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #array #element
ADD COMMENT
Topic
Name
7+6 =