This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MyClass( paramA ){ | |
propertyR = "this property is read-only"; | |
this.getPropertyR = function(){ | |
return propertyR; | |
}; | |
function privateMethod() { | |
return "privateMethod() is a private method"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MyClass( paramA ) { | |
// public member | |
this.member = paramA; | |
// private member, only accessible from the inside | |
value1 = 3; | |
// very private member, only accessible from private and priviliged actors | |
var value2 = 6; | |