DEV Community 👩‍💻👨‍💻

Discussion on: Classes in JS: Public, Private and Protected

Collapse
 
ashleybooniphone profile image
ashleybooniphone • Edited on

I have managed to emulate an extended protected class (somewhat) using a function that contains ES6's magic to destructure an Object from another function and an Object.assign to extend the Object on return.

The code in question: