DEV Community


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

ashleybooniphone profile image
ashleybooniphone • Edited

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:

Forem Open with the Forem app