Encapsulation in Javascript

How encapsulation can be achieved in Javascript:
* private fields - variables trapped within a closure,
* protected fields - don't use it at all, or use a convention (that ugly _),
* objects - created them using a factory "function", stop pretending that JS is an OOP language (forget about "new")

Example fiddle:

//just to make it easier to work in JsFiddle
function out()  
{
  var args = Array.prototype.slice.call(arguments, 0);
  var output = document.getElementById('output');
  if(!!output) output.innerHTML += args.join(" ") + "\n";
  console.log(args.join(" "));
};

var ExampleNamespace = ExampleNamespace || {};  
ExampleNamespace.Foo = function() {  
    var _privateField = '_privateFieldInFoo';

    return {
      _protectedField : '_protectedFieldInFoo',
      methodThatAccessesPrivateField : function() { 
          return _privateField; 
      },
      methodThatAccessesProtectedField : function() { 
          return this._protectedField;
      },
      publicField : 'publicFieldInFoo'
    };
};

ExampleNamespace.Bar = function() {  
    var self = ExampleNamespace.Foo();
  var _privateField = '_privateFieldInBar';
  self._barProtected = '_protectedFieldInBar';
  //override _protected
  self._protectedField = '_overridenProtectedFieldFromFooInBar';
  self.publicBarField = 'publicBarField';
  self.methodInBarThatAccessesPrivateField = function(){
      return _privateField;
  };
  return self;
};

out("Foo");  
var foo1 = ExampleNamespace.Foo();  
out(foo1.methodThatAccessesPrivateField());  
out(foo1.methodThatAccessesProtectedField());  
out(foo1.publicField);  
//but still...
out(foo1._protectedField);

//Derived from Foo
out("Bar");  
var bar1 = ExampleNamespace.Bar();  
out(bar1.methodThatAccessesPrivateField());  
out(bar1.methodInBarThatAccessesPrivateField());  
out(bar1.methodThatAccessesProtectedField());  
out(bar1.publicBarField);  
//but still...
out(bar1._protectedField);  

If better support for inheritance is required, Revealing Prototype Pattern can be used:

var ExampleNamespace = ExampleNamespace || {};  
ExampleNamespace.Foo = function() {  
  //fields
  this. ...
}
ExampleNamespace.Foo.prototype = function(){  
  var exampleFun = function() { this.  ... };
  return {
    //publics
    exampleFun : exampleFun
  };
}();