Skip to content
Sharp

Functions · interview question

Which move is the best default when return values becomes part of this workflow?

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

Correct answer

C. A good return value lets the caller continue the workflow with a clear next piece of information.

Why

A good return value lets the caller continue the workflow with a clear next piece of information. That is the stronger engineering move because clear return values are a sign that you understand how information flows through the program. Mutating external state for everything makes the control flow harder to test and harder to explain.

Test yourself on Functions

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

Start free test
All Functions questions →