3 ms·
There's nothing preventing you from defining your private variable, method, whatever within the same scope as your prototype method. That could mean (for common
by iamleppert 10y 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.
- Touche 10y agoThose wouldn't be private to each instance though, they'd be shared by all instances.