Hacker News new | ask | show | jobs
by iamleppert 3627 days ago
There's nothing preventing you from defining your private variable, method, whatever within the same scope as your prototype method. That could mean (for commonJS anyways) the same file. As long as you don't export those, they are effectively private.
1 comments

Those wouldn't be private to each instance though, they'd be shared by all instances.