Answers for "find the last element of array"

10

javascript take last element of array

let array = [1,2,3,4,5];
let lastElement = array.pop();

// array -> [1,2,3,4];
// lastElement = 5;
Posted by: Guest on May-06-2020

Code answers related to "find the last element of array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language