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 flaviocopes.com #
 
PREVIOUS NEXT
Tagged: #js #pick #element #array
ADD COMMENT
Topic
Name
6+8 =