How to Use the JavaScript Array.at() Method to Get First, Last, and Second-Last Items
JavaScript has a built-in method called .at() which allows you to access array items in their index. at() has a number of advantages: cleaner, and easier, to read does relative…