[Solved] How do I input variables into a return command in a function? [closed]


Its so easy to input these parameters to the return statement just use + operator before and after parameters as below:-

function rollDice(number, sides) {
    return "Rolled " + number +  " " + sides +" sided dice";
}

and also you can change integers to string using integerValue.toString() for example 5.toString() or for your code number.toString().

solved How do I input variables into a return command in a function? [closed]