Stores the sum of elements at odd and even indices
let evensum = arr [ 0 ] , oddsum = 0 ; for ( let i = 3 ; i < N ; i += 2 ) { evensum += arr [ i ] ; } for ( let i = 2 ; i < N ; i += 2 ) { oddsum += arr [ i ] ; }