@dpashkevich The point of this post is "Prototypes can't talk to local variables in constructor".
this.count = 0;
is a pretty good method to follow, but the stress is, when we distribute the code to beginners, some might end up writing code that messes up the sensitive information simply by extending the code via prototypes (or) directly modifying count
in this case. So we might want to simulate a model where we can use something as private variables. (stressing - by private
, I don't mean typical class System as in other languages.)
The point again, is just, if we write JS code assuming that to represent a class (simulating it), then, there is a bottleneck of not accessing some variables - destined to contain secure information that should be modified based on some function alone and should not be accessed directly.
https://www.openshift.com/blogs/paas-websockets
It seems, we have to use the port "8000" and "8443" for websockets.
I've been trying to change this on the client using
But request keeps going to port 80 ... Is there any work around for this ?