Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js pick last element of array

const array = [a,b,c,d]
let last = array[array.length - 1]
console.log(last)
// "d"
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #js #pick #element #array
ADD COMMENT
Topic
Name
5+1 =