Skip to content
Sharp

Functions · interview question

Which option describes the most likely pitfall around return values?

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

Correct answer

C. Mutating external state for everything makes the control flow harder to test and harder to explain.

Why

Mutating external state for everything makes the control flow harder to test and harder to explain. Calling out that risk matters because clear return values are a sign that you understand how information flows through the program.

Test yourself on Functions

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

Start free test
All Functions questions →