Skip to content
Sharp

Control Flow · interview question

What is the clearest sign that code around for loops should be refactored?

Multiple choiceEasychapter-2-curatedpremiumcontrol-flowfor-loops
Choose one answer
Answer and explanation

Correct answer

B. 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. Use loops to express repeated work directly and accumulate values in a way the next engineer can verify.

Test yourself on Control Flow

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

Start free test
All Control Flow questions →