loading...

SumAllRange

95freedom95 profile image Oscar Hernandez ・1 min read

function sumAll(arr) {
var a = arr[0]; var b =arr[1];
var n = (a+b+a+b);
var p = (a+b);
for(let i=0; i if(p<=5){
arr = n;
}if(p>10){
arr = p+n;
}
console.log(arr)
return arr;
}
}
sumAll([1, 4]);

?signin=true

Discussion

markdown guide