Easy
How to Get the Last Element of an Array in JavaScript: Different Methods Explained
In JavaScript, how could we return the last element of an array?
1// example2const array = ['hello', 'world', '!'];3// MISSING LINE HERE4const lastElement = ...56console.log(lastElement); // '!'