const arr = [2, 4, 6, 8, 10, 12, 14, 16]; const lastElement1 = arr[arr.length - 1]; // Method 1 const lastElement2 = arr.slice(-1); //Method 2 const lastElement3 = arr.pop(); //Method 3 const lastElement4 = arr.at(-1) //Method 4 Best Approach