Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

private class members javascript

class Person {
    constructor(name) {
        var _name = name
        this.setName = function(name) { _name = name; }
        this.getName = function() { return _name; }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #private #class #members #javascript
ADD COMMENT
Topic
Name
6+9 =