exercises/290-sort-arrays.js
// compares the sums of the arrays and giving a positive number a 1 and a negative number a -1.
compares the sums of the arrays and giving a positive number a 1 and a negative number a -1.
compares the sums of the arrays and giving a positive number a 1 and a negative number a - 1 .
function compareSums(arrayA, arrayB){
    let compareResult;
    if (addedArray(arrayA) > addedArray(arrayB)){
        compareResult = 1;
    } else if (addedArray(arrayA) < addedArray(arrayB)){
        compareResult = -1;
    } else
    compareResult = 0;
    return compareResult;
}
function compareSums ( arrayA , arrayB ) { let compareResult ; if ( addedArray ( arrayA ) > addedArray ( arrayB ) ) { compareResult = 1 ; } else if ( addedArray ( arrayA ) < addedArray ( arrayB ) ) { compareResult = - 1 ; } else compareResult = 0 ; return compareResult ; }
compares the sums of the arrays and giving a positive number a 1 and a negative number a -1.
compares the sums of the arrays and giving a positive number a 1 and a negative number a - 1 .