Encapsulation: Private and Public Methods

Especially for developing API, self documenting code is very important, to simplify users effort in filtering the information he needs. If it is clearly visible which parts are public and which parts are private, understanding the big picture of the API would be easier for the user. Combining the information from class inheritance and function context articles, we can use this Javascript function encapsulation technique:
(function() {
    var my_private_method_1 = function(param_1) {
        alert(this.settings.param1);
    };

    var init = function(settings) { // constructor
      this.settings = $.extend(true, {}, settings);
    };

    var my_public_method_1 = function() {
        // this public method have the access to call private methods:
        my_private_method_1.bind(this)();
    };

    // Anything listed below are public methods
    My_Class = Class.extend({
        init: init,
        my_public_method_1: my_public_method_1
    });
})();
      
var my_object = new My_Class({
  param1: 'abcdef'
});
my_object.my_public_method_1();