function A(a, b) {
return a[b] * b;
}
function B(a) {
var x = 0;
for (var i=5; i>0; i--)
x += A(a, i);
return x;
}
var aValues = [3,5,9,8,7,1];
var y = B(aValues);
Would the answer be: B(1) B(3) B(5) B(7) B(8) B(9) ? Im lost be any push in the right direction would be appreciated.
y? Because if that was the case, y should just be an integer...