As you can see from the embed below... my script is only returning one result(500). How can I rewrite my code so that I get both results? Thank you in advance for your advice.
You can try the following approach
function multiplier() {
var number = 25;
var multiplier20 = 20;
var res1 = 0;
var res2 = 0;
if (number && multiplier20); {
res1 = number * multiplier20;
}
var multiplier1 = 1;
if (number && multiplier1); {
res2 = number * multiplier1;
}
return {res1,res2};
}
var ret = multiplier();
console.log(ret);