Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JS last element of array

const arr = [1,2,3,4,5]
arr.at(-1) //returns 5
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #JS #element #array
ADD COMMENT
Topic
Name
1+9 =