JavaScript return
JavaScript return
The return statement is used to stop the execution of a function and returns a value. Code present after the return will not be executed if the return condition is true.
Syntax:-
Its syntax is:- return value;
Further Explanation:-
Parameter | Description |
value | Optional. The value to be returned. If not specified, then undefined. |