Skip to content
Sharp

Functions · interview question

What is the clearest sign that code around return values should be refactored?

Multiple choiceMediumchapter-2-curatedpremiumfunctionsreturn-values
Choose one answer
Answer and explanation

Correct answer

D. When the rule is no longer easy to trace, explain, or change without breaking nearby behavior.

Why

A refactor is justified when the code stops communicating its intent. A good return value lets the caller continue the workflow with a clear next piece of information.

Test yourself on Functions

A free test with instant, explained results. No account needed.

Start free test
All Functions questions →