Skip to content
Sharp

Control Flow · interview question

What is the clearest sign that code around while loops and retries should be refactored?

Multiple choiceMediumchapter-2-curatedpremiumcontrol-flowwhile-loops-and-retries
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 while loops when the rule is about continuing until a condition changes, such as retries or pagination progress.

Test yourself on Control Flow

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

Start free test
All Control Flow questions →