How To Use The Return Keyword In A Function

[Solved] How To Use The Return Keyword In A Function | Lisp - Code Explorer | yomemimo.com
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

Answers related to how to use the return keyword in a function

Code Explorer Popular Question For Lisp