Encapsulation is a concept of bundling of data related variables, properties, and method in one class. Also, it covers the approach for restricting direct access to some of the data structure elements (fields, properties, methods, etc).
Here is an article in this theme.
/ object-oriented-programming-in-javascript-...
Here are few gists with same class but different approaches to archive privacy:
Encapsulation using convention:
https://gist.github.com/ViktorKukurba...
Encapsulation using @babel/plugin-proposal-class-properties:
https://gist.github.com/ViktorKukurba...
Encapsulation using WeakMap:
https://gist.github.com/ViktorKukurba...
On this page of the site you can watch the video online JavaScript ES7 OOP. Encapsulation. #4 with a duration of hours minute second in good quality, which was uploaded by the user FPV волонтерка 20 September 2018, share the link with friends and acquaintances, this video has already been watched 4,343 times on youtube and it was liked by 54 viewers. Enjoy your viewing!