I'm currently using ALTJS on my javascript project and so am pretty much stuck with ES6 classes.
My questions is in regards to said classes. Is there a way to have private internal methods? For example:
class something() {
constructor(){}
methodOne(){}
methodTwo(){}
}
You cannot access method two from inside method one and vice verser. In that case, what is the correct way to have a internal utility function. For example, some code that completes a calculation, that multiple methods should use, that I wouldn't want to repeat multiple times (DRY).
I understand that there are static methods. However, it seems bizarre that I then have to access these by calling something.staticMethod. In this case there is no need for the method to be public.
I've read a lot of es6 class articles online and none of them seem to address this concern.
Thanks!