What is encapsulation in JavaScript and how does it works?

What is encapsulation in JavaScript and how does it works?