Answers for "how to get last item in an array"

5

javascipt get last element of array

const arr = [1,2,3] ;
console.log(arr[arr.length - 1]);
Posted by: Guest on June-18-2020

Code answers related to "how to get last item in an array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language