Question : How to Use the Return Keyword in a Function
Answered by : godswill-ohiole-agangan
// return is a directive that returns a value to the function after the code within it has been executed.
function sum(a, b){ return a + b;
}
sum(10, 20);
//output will be 30
Source : https://www.freecodecamp.org/news/what-are-functions-in-javascript-a-beginners-guide/ | Last Update : Fri, 08 Jul 22