Question 6 of 10Pro Only

What is Test-Driven Development (TDD)? Explain the Red-Green-Refactor cycle.

Sample answer preview

## What is TDD? Test-Driven Development is a **development methodology where you write tests before writing the actual code**. It flips the traditional approach: instead of code → test, you do test → code.

TDDRed-Green-Refactortest firstmethodologydesignrefactoring

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Full-Stack Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime