Question · JavaScript and TypeScript course · Module 9: Design Patterns and Architecture

Single Responsibility Principle

What does the Single Responsibility Principle (SRP) mean?

Answer options

  • An application should have only one entry file
  • A function should accept only one parameter
  • Each class should have only one responsibility and one reason to change
  • Each module should export only one value

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