const arr = [1, 2, 3, 4, 5]; console.log(_.last(arr)); // Output: 5
const arr = ['apple', 'banana', 'cherry']; console.log(_.last(arr, 2)); // Output: ['banana', 'cherry']This example shows how to use the optional second parameter of `_.last()` to return the last `n` elements of an array. The code examples above use the JavaScript library Underscore.