Skip to content
Sharp

Functions · interview question

A teammate submits shaky function extraction code. Which review comment is the strongest?

Multiple choiceMediumchapter-2-curatedpremiumfunctionsfunction-extraction
Choose one answer
Answer and explanation

Correct answer

D. Make the rule clearer and easier to explain. Extract helpers when the name clarifies one step of the workflow and the caller becomes easier to read.

Why

The best review comment anchors the change to readability, correctness, and future maintenance. Copy-pasted logic or giant helper functions usually mean the code has not decided where one responsibility ends.

Test yourself on Functions

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

Start free test
All Functions questions →