👤

Write a for loop that sets each array element in bonusscores to the sum of itself and the next element, except for the last element which stays the same. Be careful not to index beyond the last element.