Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript last element of array

let arr = [1,2,3]
arr[arr.length - 1] //returns last element in an array
 
PREVIOUS NEXT
Tagged: #javascript #element #array
ADD COMMENT
Topic
Name
5+1 =