What is the role of the return keyword inside a JavaScript function ? Explain with an example.
Show Hint
The return statement can also be used without a specified value (e.g., return;) to act as an early exit safeguard inside control loops or conditional blocks:
if (input === null) return;