DEV Community

loading...

Discussion on: Modules vs Classes - How to Manage Privacy in JS

Collapse
caiangums profile image
Ilê Caian Author

Hey! Thanks for your reply!

Actually, elonTrashCan.isEmpty() returns false as TrashCan is a Module and not a Class. You can read more about it at the related and cited post about Closures

You could also run the test code and see it running.