Question · JavaScript and TypeScript course · Module 7: Advanced TypeScript

Arrow Anti-Pattern

What is the so-called "Arrow Anti-Pattern" (Pyramid of Doom) in code?

Answer options

  • Code nested in many if/else levels, forming an arrow shape and hard to read
  • An arrow function written on a single line
  • The => operator used in a type declaration
  • An array sorted into a pyramid shape

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