But built-in classes are an exception. They don’t inherit statics from each other.
Built-in classes like Array, Map and others are extendable also.
When arr.filter() is called, it internally creates the new array of results using exactly arr.constructor, not basic Array
Other collections, such as Map and Set, work alike. They also use Symbol.species.
Symbol.species to the class. If it exists, it should return the constructor that JavaScript will use internally to create new entities in map, filter and so on.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.