// User Class function User(){ this.first = "Joseph"; // public property var middleName = "Anthony"; // private property this.last = function(){ // public method return "Janiga"; }; function getFullName(){ // private method return this.first + " " + middle + " " + this.last(); }; this.printName = function(){ console.log(getFullName()); }; } var joe = new User(); joe.first; // "Joseph" // middleName - not exposed from this scope joe.last(); // "Janiga" // getFullName() - not exposed outside of the class body joe.printName(); // "Joseph Anthony Janiga" - THIS however works because the printName method has access to the class scope