What goes in the blank?
// last element, without changing the array const last = arr.at(____);
Answer: -1
A negative index counts back from the end, so
Play Problem Solving ▸
at(-1) is the final element.// last element, without changing the array const last = arr.at(____);
Answer: -1
at(-1) is the final element.