Put in order · JavaScript and TypeScript course · Module 9: Design Patterns and Architecture

Stages of Refactoring to a Design Pattern

Arrange the stages of refactoring code to a design pattern:

Items to put in order

  • Extract common logic into a new class/module
  • Test the refactored code
  • Implement the pattern interface/contract
  • Choose the appropriate design pattern
  • Identify the recurring problem in the code

You can check the correct answer by solving this task in the CodeWorlds game.