I having some trouble understanding how to make functions private
I have created an instance of an object using a constructor function and
there are 4 prototypes:
Comm = function() {
//blah
}
Comm.prototype. get = function() {
//blah
}
Comm.prototype. set = function() {
//blah
}
Comm.prototype. start = function() {
//blah
}
Comm.prototype. end = function() {
//blah
}
foo = new Comm();
There are 8 "supporting " functions (additional functions that each of
the prototypes may call). How can I make the "supporting " functions
private yet still available to all prototypes? That is, only a prototype
may call a "supporting " function.
Andrew Poulos
I have created an instance of an object using a constructor function and
there are 4 prototypes:
Comm = function() {
//blah
}
Comm.prototype. get = function() {
//blah
}
Comm.prototype. set = function() {
//blah
}
Comm.prototype. start = function() {
//blah
}
Comm.prototype. end = function() {
//blah
}
foo = new Comm();
There are 8 "supporting " functions (additional functions that each of
the prototypes may call). How can I make the "supporting " functions
private yet still available to all prototypes? That is, only a prototype
may call a "supporting " function.
Andrew Poulos
Comment