Is it possible to create "private static" variables in JavaScript similar to Java?
My scenario is that I need to retrieve a data point from server and save in the static variable, so that my function which uses this need not make server call every time its called.
I also need the data once fetched and copied to variable not be read outside that class as I need it to be secure, want to have it private. I have read that to achieve private variable we use scope functionality in JavaScript but I also need it to be static.
Can this be achieved?