Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to access last item in array

let myArr = [1, 2, 3, 4, 5];
let arr = myArr[myArr.length - 1];
console.log(arr);
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #access #item #array
ADD COMMENT
Topic
Name
1+5 =