Why are these methods public?
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-05-10T18:05:22Z
Indexed on
2010/05/10
18:14 UTC
Read the original article
Hit count: 154
JavaScript
My javascript looks like the following. I don't understand why these methods are all public though?
Something.RegisterNamespace("One.ABC");
(function(ABC) {
ABC.SayHello = function() {
alert('hello');
};
})(One.ABC);
So now I can do:
One.ABC.SayHello();
© Stack Overflow or respective owner