Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to access last item in array

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