Answers for "funciton that returns last element 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 "funciton that returns last element array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language