Array.at The array `at` method can return the element at any position. const a = [1,2,3,4,5] Previously to find the last element of the array, we used to do: a[a.length -1] ---> 5 Instead, we can use at a.at[-1] ---> 5
a.at[-2] ---> second last element 4 structuredClone Javascript structuredClone is used…