Knowledgize

.at()

Takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.

Examples:

let array = [5, 12, 8, 130, 44]; let element = array.at(-2); console.log(element); // 130
let pets = ['cat', 'dog', 'hamster']; let pet = pets.at(1); console.log(pet); // 'dog'