Get the sum of the two arrays
let arr_1 = [3, 5, 22, 5, 7, 2, 45, 75, 89, 21, 2];
let arr_2 = [9, 2, 42, 55, 71, 22, 4, 5, 90, 25, 26];
My attempt
let total1 = 0;
let total2 = 0;
for( let i = 0; i < arr_1.length; i++){
total1+= arr_1[i];
} for ( let j = 0; j < arr_2.length; j++){
total2+=arr_2[j];
}
let arrTotal = total1 + total2;
console.log(arrTotal);
I just want to learn more or better methods of solving this loop excercise .