Skip to content
Sharp

Functions · interview question

Which move is the best default when function extraction becomes part of this workflow?

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

Correct answer

B. Extract helpers when the name clarifies one step of the workflow and the caller becomes easier to read.

Why

Extract helpers when the name clarifies one step of the workflow and the caller becomes easier to read. That is the stronger engineering move because interviewers watch for whether your function names communicate intent before anyone opens the body. 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 →