I'm trying to get the largest number of this 3 functions then store in an array, the variables of that function and their amount..can be done?
JavaScript:
//this must be the result
var result = [50,55,60,165] // function r2
function r1(){
var x = 5;
var a = 10;
var b = 10;
return x+a+b // 25
}
function r2(){
var x = 50;
var a = 55;
var b = 60;
return x+a+b // 165
}
function r3(){
var x = 25;
var a = 15;
return x+a // 40
}