const arr = [-200, -50, -20, -11, -5, -3, 2, 10, 14, 19, 42, 100, 142, 200];
let sum = 0;for (let i = arr.length - 5; i < arr.length; i++) {sum += arr[i];}
console.log(sum); // Output: 503
const arr = [-200, -50, -20, -11, -5, -3, 2, 10, 14, 19, 42, 100, 142, 200];
let sum = 0;
for (let i = arr.length - 5; i < arr.length; i++) {
sum += arr[i];
}
console.log(sum); // Output: 503