27. JavaScript. Object properties getters and setters: get(), set().

preview_player
Показать описание
There are two kinds of object properties.

The first kind is the data properties. We already know how to work with them. All properties that we’ve been using until now were data properties.

The second type of property is something new. It’s accessor properties. They are essentially functions that execute on getting and setting value, but look like regular properties to an external code.

Let's be friends:
Рекомендации по теме
welcome to shbcf.ru