The Return Statement In JavaScript
Function Return
A function can have an optional return statement that can be used to return a value from the function. When the javascript reaches the return statement, the function stops right there.
Syntax:-
function add_two_numbers(num1, num2){
return num1 + num2;
}