Problem

Return arr[0] + arr[arr.length-1].

Examples

  • firstLastSum([2, 3, 5]) -> 7
Compile and test (Ctrl+Enter)