In JS, encapsulation is the means in which features are implemented in a reusable way with both hidden implementation of hidden properties and features along with accessible properties and features.

In other words, encapsulation refers to all the functionalities of an object hidden from the rest of the application and the functionalities that're available to the rest of the application.

Encapsulation is achieved through closures, function scope, and global scope.

References

https://stackoverflow.com/questions/3597087/encapsulation-in-javascript