Lambda saysreturn sends a value back and stops the function; no return yields undefined.
return value hands a result to the caller and immediately exits. A function with no return (or a bare return) yields undefined. Watch automatic semicolon insertion: a return alone on its line returns undefined even if a value follows on the next line.
Power-ups you unlock
return hands back a value and exits
No return → undefined
Use early returns as guard clauses
ASI gotcha: don’t put the value on a new line
The Mutator attacks — common mistakes
return on its own line, value below (returns undefined)
Forgetting to return in a helper
Code after an unconditional return (dead code)
Boss battleWrite a function that returns early for invalid input, otherwise computes a result.