What is the purpose of Symbol.species and why is it controversial?

JavaScript Professional Hard

JavaScript Professional — Hard

What is the purpose of Symbol.species and why is it controversial?

Key points

  • Symbol.species lets subclasses control constructor used in methods
  • Controversial due to complicating subclassing
  • Proposed for removal in some discussions

Ready to go further?

Related questions