Symbol.species Controls Constructor?!

Symbol.species is POWERFUL! It controls what constructor methods return. Your custom array methods return plain Array, not your subclass! This breaks inheritance!

#javascript #javascripttricks #symbol.species #constructorcontrol #subclassing #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #classinheritance #advancedjavascript

https://www.youtube.com/watch?v=3eq3XAas_pc

Symbol.species Controls Constructor?! #codingchallenge

YouTube
In the world of OOP, it's not about the bourgeoisie and the proletariat. It's about the parent classes and the child classes. And let's just say, inheritance issues are real! πŸ˜‚ #ClassInheritance #CodeRevolution