function simpleArraySum(ar) {
let sum = 0;
for(let i=1; i< ar.length; i++){ //O(n)
if(i === 1){
sum = ar[i] + ar[i-1];
}else{
sum = ar[i] + sum;
}
}
console.log(sum)
}
// console.log([ 1, 2, 3, 4, 10, 11 ]);
console.log(simpleArraySum([ 1, 2, 3, 4, 10, 11 ]))