Sponsored
Use these hints if you're stuck. Try solving on your own first.
Declare a variable "res" and set it it equal to the initial value.
Loop over each value in the array and set "res" = fn(res, arr[i]).
Solve with full IDE support and test cases