{"id":1777,"date":"2021-05-24T11:30:35","date_gmt":"2021-05-24T11:30:35","guid":{"rendered":"https:\/\/lvboard.infostore.in.ua\/?p=1777"},"modified":"2021-05-24T11:30:35","modified_gmt":"2021-05-24T11:30:35","slug":"%d0%be%d0%b1%d1%8a%d0%b5%d0%ba%d1%82%d0%bd%d0%be-%d0%be%d1%80%d0%b8%d0%b5%d0%bd%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d1%8b%d0%b9-javascript-%d0%bf%d1%80%d0%be%d1%81%d1%82%d1%8b%d0%bc%d0%b8","status":"publish","type":"post","link":"https:\/\/lvboard.infostore.in.ua\/?p=1777","title":{"rendered":"\u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 JavaScript \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438"},"content":{"rendered":"\n<p>\u0412 JavaScript \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 4 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n\n\n\n<!--more-->\n\n\n\n<ul><li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u043e\u043d\u0442\u0440\u0443\u043a\u0442\u043e\u0440 (constructor function)<\/li><li>\u041a\u043b\u0430\u0441\u0441 (class)<\/li><li>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (object linking to other object, OLOO)<\/li><li>\u0424\u0430\u0431\u0440\u0438\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f (factory function)<\/li><\/ul>\n\n\n\n<p>\u041a\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u041a\u0430\u043a\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u043c?<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043c\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0444\u0430\u0431\u0440\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c: \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f, \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u00abthis\u00bb, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n\n\n\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u041e\u041e\u041f).<\/p>\n\n\n\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u041e\u041e\u041f?<\/h3>\n\n\n\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u041e\u041e\u041f \u2014 \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412 \u044d\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u00bb. \u041e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u043d\u043e\u043c, \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438\u043b\u0438 \u0441\u0445\u0435\u043c\u043e\u0439 (blueprint), \u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u2014 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 (instances).<\/p>\n\n\n\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0435 \u043e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0442\u0430\u043a \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 Human (\u0447\u0435\u043b\u043e\u0432\u0435\u043a), \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438.<\/p>\n\n\n\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u041e\u041e\u041f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c (inheritance) \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432) (subclassing).<\/p>\n\n\n\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u041e\u041e\u041f \u2014 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0442 \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445, \u0434\u0435\u043b\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0438\u0437\u0432\u043d\u0435. \u0412 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u041c\u043e\u0434\u0443\u043b\u044c\u00bb \u0438 \u00ab\u0424\u0430\u0441\u0430\u0434\u00bb.<\/p>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0441 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n\n\n\n<h3>\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/h3>\n\n\n\n<h6>\u0424\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/h6>\n\n\n\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u00abthis\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    function Human(firstName, lastName) {\n        this.firstName = firstName\n        this.lastName = lastName\n    }\n<\/code><\/pre>\n\n\n\n<p>this \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430. \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u00abnew\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const chris = new Human('Chris', 'Coyier')\nconsole.log(chris.firstName) <em>\/\/ Chris<\/em>\nconsole.log(chris.lastName) <em>\/\/ Coyier<\/em>\n\nconst zell = new Human('Zell', 'Liew')\nconsole.log(zell.firstName) <em>\/\/ Zell<\/em>\nconsole.log(zell.lastName) <em>\/\/ Liew<\/em>\n<\/code><\/pre>\n\n\n\n<h6>\u041a\u043b\u0430\u0441\u0441<\/h6>\n\n\n\n<p>\u041a\u043b\u0430\u0441\u0441\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0435\u0439 (\u00ab\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0430\u0445\u0430\u0440\u043e\u043c\u00bb) \u043d\u0430\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u043c\u0438. \u041e\u043d\u0438 \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    class Human {\n        constructor(firstName, lastName) {\n            this.firstName = firstName\n            this.lastName = lastName\n        }\n    }\n<\/code><\/pre>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e constructor \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434, \u0447\u0442\u043e \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c this. \u041c\u044b \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c constructor, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u043b\u0430\u0441\u0441\u044b \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430. \u041f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u043b\u043e\u0448\u0430\u0434\u0435\u0439 \u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432. \u041a\u043b\u0430\u0441\u0441\u044b \u2014 \u044d\u0442\u043e \u043a\u0440\u0443\u0442\u043e. \u0427\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0432\u044b \u043f\u043e\u0439\u043c\u0435\u0442\u0435 \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n\n\n\n<p>\u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u00abnew\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const chris = new Human('Chris', 'Coyier')\n\nconsole.log(chris.firstName) <em>\/\/ Chris<\/em>\nconsole.log(chris.lastName) <em>\/\/ Coyier<\/em>\n<\/code><\/pre>\n\n\n\n<h6>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/h6>\n\n\n\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d Kyle Simpson. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u0417\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f init, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 constructor \u0432 \u043a\u043b\u0430\u0441\u0441\u0435) \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const Human = {\n    init(firstName, lastName) {\n        this.firstName = firstName\n        this.lastName = lastName\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Object.create. \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f init.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const chris = Object.create(Human)\nchris.init('Chris', 'Coyier')\n\nconsole.log(chris.firstName) <em>\/\/ Chris<\/em>\nconsole.log(chris.lastName) <em>\/\/ Coyier<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u041a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c this \u0432 init.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const Human = {\n  init () {\n    <em>\/\/ ...<\/em>\n    return this\n  }\n}\n\nconst chris = Object.create(Human).init('Chris', 'Coyier')\nconsole.log(chris.firstName) <em>\/\/ Chris<\/em>\nconsole.log(chris.lastName) <em>\/\/ Coyier<\/em>\n<\/code><\/pre>\n\n\n\n<h6>\u0424\u0430\u0431\u0440\u0438\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/h6>\n\n\n\n<p>\u0424\u0430\u0431\u0440\u0438\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442. \u041c\u043e\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n\n\n\n<p>\u0412\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0431\u0440\u0438\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human(firstName, lastName) {\n    return {\n        firstName,\n        lastName\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043d\u0430\u043c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u00abnew\u00bb. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const chris = Human('Chris', 'Coyier')\n\nconsole.log(chris.firstName) <em>\/\/ Chris<\/em>\nconsole.log(chris.lastName) <em>\/\/ Coyier<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n\n\n\n<h3>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h3>\n\n\n\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    const someObject = {\n        someMethod () { <em>\/* ... *\/<\/em> }\n    }\n<\/code><\/pre>\n\n\n\n<p>\u0412 \u041e\u041e\u041f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432:<\/p>\n\n\n\n<ul><li>\u0412 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435<\/li><li>\u0412 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435<\/li><\/ul>\n\n\n\n<h6>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435<\/h6>\n\n\n\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  <em>\/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430<\/em>\n  this.firstName = firstName\n  this.lastname = lastName\n\n  <em>\/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b<\/em>\n  this.sayHello = function () {\n    console.log(`Hello, I'm ${firstName}`)\n  }\n}\n\nconst chris = new Human('Chris', 'Coyier')\nconsole.log(chris)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/5c\/ik\/sn\/5ciksn11exfeofob6qh7a7zgwwy.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041c\u0435\u0442\u043e\u0434\u044b, \u043e\u0431\u044b\u0447\u043d\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u0442.\u0435. \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043e\u0431\u0449\u0435\u0439 \u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439).<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 prototype.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  this.firstName = firstName\n  this.lastname = lastName\n}\n\n<em>\/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435<\/em>\nHuman.prototype.sayHello = function () {\n  console.log(`Hello, I'm ${this.firstName}`)\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/82\/ym\/eu\/82ymeuwgjqgwdll9h_tpxmerf98.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435<\/em>\nHuman.prototype.method1 = function () { <em>\/*...*\/<\/em> }\nHuman.prototype.method2 = function () { <em>\/*...*\/<\/em> }\nHuman.prototype.method3 = function () { <em>\/*...*\/<\/em> }\n<\/code><\/pre>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Object.assign.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Object.assign(Human.prototype, {\n  method1 () { <em>\/*...*\/<\/em> },\n  method2 () { <em>\/*...*\/<\/em> },\n  method3 () { <em>\/*...*\/<\/em> }\n})\n<\/code><\/pre>\n\n\n\n<h6>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435<\/h6>\n\n\n\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432 constructor.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Human {\n  constructor (firstName, lastName) {\n      this.firstName = firstName\n      this.lastName = lastName\n\n      this.sayHello = function () {\n        console.log(`Hello, I'm ${firstName}`)\n      }\n  }\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/gd\/0x\/z7\/gd0xz7ckczw6u-ntrf-mbwsu0li.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 constructor \u0432 \u0432\u0438\u0434\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Human (firstName, lastName) {\n  constructor (firstName, lastName) { <em>\/* ... *\/<\/em> }\n\n  sayHello () {\n    console.log(`Hello, I'm ${this.firstName}`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/ia\/5r\/io\/ia5rioc_tereglizgfthqec7eda.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d Object.assign. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Human (firstName, lastName) {\n  constructor (firstName, lastName) { <em>\/* ... *\/<\/em> }\n\n  method1 () { <em>\/*...*\/<\/em> }\n  method2 () { <em>\/*...*\/<\/em> }\n  method3 () { <em>\/*...*\/<\/em> }\n}\n<\/code><\/pre>\n\n\n\n<h6>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u0440\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/h6>\n\n\n\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const Human = {\n  init (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n    this.sayHello = function () {\n      console.log(`Hello, I'm ${firstName}`)\n    }\n\n    return this\n  }\n}\n\nconst chris = Object.create(Human).init('Chris', 'Coyier')\nconsole.log(chris)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/j0\/te\/yz\/j0teyzmenbfzzcbzzy35-s3wvpe.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const Human = {\n  init () { <em>\/*...*\/<\/em> },\n  sayHello () {\n    console.log(`Hello, I'm ${this.firstName}`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/u3\/uo\/na\/u3uonarzmunfw_szdfs5nxofwmm.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u0444\u0430\u0431\u0440\u0438\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 (\u0424\u0424)<\/h6>\n\n\n\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  return {\n    firstName,\n    lastName,\n    sayHello () {\n      console.log(`Hello, I'm ${firstName}`)\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/-v\/9z\/gu\/-v9zguadqcfh0yxwvwkhhhdd1bo.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0424\u0424 \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0442\u0430\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u041d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u044d\u0442\u043e\u0433\u043e<\/em>\nfunction createHuman (...args) {\n  return new Human(...args)\n}\n<\/code><\/pre>\n\n\n\n<h3>\u0413\u0434\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b<\/h3>\n\n\n\n<p>\u0413\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b? \u0412 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 \u0438\u043b\u0438 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435?<\/p>\n\n\n\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b.<\/p>\n\n\n\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430\u0445, \u043f\u0430\u043c\u044f\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432, \u044d\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0432\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0439, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b.<\/p>\n\n\n\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0434 \u043b\u0435\u0433\u0447\u0435 \u043f\u0438\u0441\u0430\u0442\u044c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0424\u0424 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f. \u041c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432.<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440.: \u043f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f \u0441 \u0430\u0432\u0442\u043e\u0440\u043e\u043c. \u0412\u043e\u043f\u0440\u043e\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u0442\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435. \u0415\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 (\u043e\u0431\u0449\u0438\u043c\u0438) \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432, \u0442\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e.<\/p>\n\n\n\n<h3>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434<\/h3>\n\n\n\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0432\u043e\u0434\u043e\u0432. \u042d\u0442\u043e \u043c\u043e\u0435 \u043b\u0438\u0447\u043d\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435.<\/p>\n\n\n\n<ul><li>\u041a\u043b\u0430\u0441\u0441\u044b \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0438\u0445 \u043b\u0435\u0433\u0447\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/li><li>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u0438\u0437-\u0437\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Object.create. \u042f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u043b \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/li><li>\u041a\u043b\u0430\u0441\u0441\u044b \u0438 \u0424\u0424 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0424\u0424 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b. \u041d\u043e, \u043a\u0430\u043a \u044f \u043e\u0442\u043c\u0435\u0442\u0438\u043b \u0440\u0430\u043d\u0435\u0435, \u044d\u0442\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/li><\/ul>\n\n\n\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0424\u0424 \u043a\u0430\u043a \u0434\u0432\u0430 \u043b\u0443\u0447\u0448\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 JavaScript.<\/p>\n\n\n\n<h3>\u041a\u043b\u0430\u0441\u0441\u044b \u043f\u0440\u043e\u0442\u0438\u0432 \u0424\u0424 \u2014 \u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n\n\n\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0424\u0424, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c\u0438, \u043b\u0435\u0436\u0430\u0449\u0438\u043c\u0438 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u041e\u041e\u041f:<\/p>\n\n\n\n<ul><li>\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435<\/li><li>\u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f<\/li><li>this<\/li><\/ul>\n\n\n\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n\n\n\n<h6>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435?<\/h6>\n\n\n\n<p>\u0412 JavaScript \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c\u0443, \u0442.\u0435. \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443.<\/p>\n\n\n\n<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n\n\n\n<ul><li>\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430<\/li><li>\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432<\/li><\/ul>\n\n\n\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u044d\u0442\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n\n\n\n<h6>\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h6>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u2014 \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439.<\/p>\n\n\n\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u044d\u0442\u043e \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n\n\n\n<h6>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430<\/h6>\n\n\n\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u00abextends\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Child extends Parent {\n    <em>\/\/ ...<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u00abDeveloper\u00bb, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u00abHuman\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u043a\u043b\u0430\u0441\u0441 Human<\/em>\nclass Human {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n  }\n\n  sayHello () {\n    console.log(`Hello, I'm ${this.firstName}`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041a\u043b\u0430\u0441\u0441 \u00abDeveloper\u00bb \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c Human \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Developer extends Human {\n  constructor(firstName, lastName) {\n    super(firstName, lastName)\n  }\n\n    <em>\/\/ ...<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u00absuper\u00bb \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 constructor \u043a\u043b\u0430\u0441\u0441\u0430 \u00abHuman\u00bb. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, super \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Developer extends Human {\n  <em>\/\/ ...<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, Developer \u0443\u043c\u0435\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 (\u043a\u0442\u043e \u0431\u044b \u043c\u043e\u0433 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c). \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u043c\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Developer extends Human {\n  code (thing) {\n    console.log(`${this.firstName} coded ${thing}`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u00abDeveloper\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const chris = new Developer('Chris', 'Coyier')\nconsole.log(chris)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/rb\/w_\/62\/rbw_62_mr_pioocghg5vihha6k4.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0424\u0424<\/h6>\n\n\n\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0424\u0424 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c 4 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n\n\n\n<ul><li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0424\u0424<\/li><li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/li><li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430<\/li><li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u044d\u0442\u0443 \u043a\u043e\u043f\u0438\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b<\/li><\/ul>\n\n\n\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Subclass (...args) {\n  const instance = ParentClass(...args)\n  return Object.assign({}, instance, {\n    <em>\/\/ \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b<\/em>\n  })\n}\n<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 \u00abDeveloper\u00bb. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0424\u0424 \u00abHuman\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  return {\n    firstName,\n    lastName,\n    sayHello () {\n      console.log(`Hello, I'm ${firstName}`)\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c Developer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Developer (firstName, lastName) {\n  const human = Human(firstName, lastName)\n  return Object.assign({}, human, {\n    <em>\/\/ \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b<\/em>\n  })\n}\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u043c\u0443 \u043c\u0435\u0442\u043e\u0434 \u00abcode\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Developer (firstName, lastName) {\n  const human = Human(firstName, lastName)\n  return Object.assign({}, human, {\n    code (thing) {\n      console.log(`${this.firstName} coded ${thing}`)\n    }\n  })\n}\n<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 Developer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const chris = Developer('Chris', 'Coyier')\nconsole.log(chris)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/s2\/lt\/4k\/s2lt4kzptmnrm-wzh5l6pmpqzcq.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430<\/h6>\n\n\n\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<ul><li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c<\/li><li>\u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e)<\/li><li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435<\/li><\/ul>\n\n\n\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Developer extends Human {\n  sayHello () {\n    <em>\/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/em>\n    super.sayHello()\n\n    <em>\/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434<\/em>\n    console.log(`I'm a developer.`)\n  }\n}\n\nconst chris = new Developer('Chris', 'Coyier')\nchris.sayHello()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/s8\/ez\/h8\/s8ezh8zmjdnel7orhqg28htrzzq.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0422\u043e\u0442 \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0424\u0424.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Developer (firstName, lastName) {\n  const human = Human(firstName, lastName)\n\n  return Object.assign({}, human, {\n      sayHello () {\n        <em>\/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/em>\n        human.sayHello()\n\n        <em>\/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434<\/em>\n        console.log(`I'm a developer.`)\n      }\n  })\n}\n\nconst chris = new Developer('Chris', 'Coyier')\nchris.sayHello()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/s8\/ez\/h8\/s8ezh8zmjdnel7orhqg28htrzzq.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438<\/h6>\n\n\n\n<p>\u0420\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0434\u043a\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u042d\u043a\u0441\u043f\u0435\u0440\u0442\u044b \u0432\u0440\u043e\u0434\u0435 Eric Elliot \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e.<\/p>\n\n\n\n<p>\u0427\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f?<\/p>\n\n\n\n<h6>\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438<\/h6>\n\n\n\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0435\u0449\u0435\u0439 \u0432 \u043e\u0434\u043d\u0443. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u0438 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Object.assign.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const one = { one: 'one' }\nconst two = { two: 'two' }\nconst combined = Object.assign({}, one, two)\n<\/code><\/pre>\n\n\n\n<p>\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043b\u0435\u0433\u0447\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430, Developer \u0438 Designer. \u0414\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u044b \u0443\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d, \u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u2014 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434. \u041e\u0431\u0430 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 \u00abHuman\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Human {\n  constructor(firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n  }\n\n  sayHello () {\n    console.log(`Hello, I'm ${this.firstName}`)\n  }\n}\n\nclass Designer extends Human {\n  design (thing) {\n    console.log(`${this.firstName} designed ${thing}`)\n  }\n}\n\nclass Developer extends Designer {\n  code (thing) {\n    console.log(`${this.firstName} coded ${thing}`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043c\u0435\u0441\u044c\u044e \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u2014 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d, \u0442\u0430\u043a \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e DesignerDeveloper (\u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u0443\u0433\u043e\u0434\u043d\u043e, DeveloperDesigner).<\/p>\n\n\n\n<p>\u041a\u0430\u043a \u043d\u0430\u043c \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c?<\/p>\n\n\n\n<p>\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u00abDesigner\u00bb \u0438 \u00abDeveloper\u00bb. \u042d\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0448\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u043c\u0438. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f&nbsp;<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%BE%D0%BC%D0%B1%D0%BE%D0%B2%D0%B8%D0%B4%D0%BD%D0%BE%D0%B5_%D0%BD%D0%B0%D1%81%D0%BB%D0%B5%D0%B4%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5\">\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0440\u043e\u043c\u0431\u0430 (\u0440\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u044b\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c)<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/ar\/ax\/0j\/arax0jxftzbfxdnb-sqifnl5bjg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u043e\u043c\u0431\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Object.assign, \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u0434\u0430\u0434\u0438\u043c \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043d\u0430\u0434 \u0434\u0440\u0443\u0433\u0438\u043c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 JavaScript \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/em>\nclass DesignerDeveloper extends Developer, Designer {\n  <em>\/\/ ...<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f.<\/p>\n\n\n\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 \u00abDesignerDeveloper\u00bb, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0432\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n\n\n\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const skills = {\n    code (thing) { <em>\/* ... *\/<\/em> },\n    design (thing) { <em>\/* ... *\/<\/em> },\n    sayHello () { <em>\/* ... *\/<\/em> }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043a\u043b\u0430\u0441\u0441 \u00abHuman\u00bb, \u0432\u0435\u0434\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n\n\n\n<p>\u0412\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f DesignerDeveloper.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class DesignerDeveloper {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n\n    Object.assign(this, {\n      code: skills.code,\n      design: skills.design,\n      sayHello: skills.sayHello\n    })\n  }\n}\n\nconst chris = new DesignerDeveloper('Chris', 'Coyier')\nconsole.log(chris)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/s7\/dh\/6u\/s7dh6ukcwi4duhgiuqzlh1twfio.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u044f Designer \u0438 Developer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Designer {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n\n    Object.assign(this, {\n      design: skills.design,\n      sayHello: skills.sayHello\n    })\n  }\n}\n\nclass Developer {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n\n    Object.assign(this, {\n      code: skills.code,\n      sayHello: skills.sayHello\n    })\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0412\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435? \u042d\u0442\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u043d\u043e \u044f \u043d\u0430\u0445\u043e\u0436\u0443 \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u043c (\u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0432\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c \u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u043c).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class DesignerDeveloper {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n  }\n}\n\nObject.assign(DesignerDeveloper.prototype, {\n  code: skills.code,\n  design: skills.design,\n  sayHello: skills.sayHello\n})\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/_n\/hu\/r4\/_nhur452mh1ai-xdkhzncf2kpla.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c.<\/p>\n\n\n\n<h6>\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0424\u0424<\/h6>\n\n\n\n<p>\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0424\u0424 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function DesignerDeveloper (firstName, lastName) {\n  return {\n    firstName,\n    lastName,\n    code: skills.code,\n    design: skills.design,\n    sayHello: skills.sayHello\n  }\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/_k\/rb\/hb\/_krbhbnc4x_negfjyzcyo-ebatc.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f<\/h6>\n\n\n\n<p>\u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.<\/p>\n\n\n\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0441 Designer, Developer \u0438 DesignerDeveloper, \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u044e\u0434\u044c\u043c\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u00abHuman\u00bb.<\/p>\n\n\n\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Human {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n  }\n\n  sayHello () {\n    console.log(`Hello, I'm ${this.firstName}`)\n  }\n}\n\nclass DesignerDeveloper extends Human {}\nObject.assign(DesignerDeveloper.prototype, {\n  code: skills.code,\n  design: skills.design\n})\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/y0\/hl\/xm\/y0hlxm2euhqrc8anh8g_w8solxm.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0410 \u0432\u043e\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0424\u0424.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  return {\n    firstName,\n    lastName,\n    sayHello () {\n      console.log(`Hello, I'm ${this.firstName}`)\n    }\n  }\n}\n\nfunction DesignerDeveloper (firstName, lastName) {\n  const human = Human(firstName, lastName)\n  return Object.assign({}, human, {\n    code: skills.code,\n    design: skills.design\n  })\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/mo\/gc\/pe\/mogcpex8_d58s89e7rphuu2rvke.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u041f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435<\/h6>\n\n\n\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u044b \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 (\u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439), \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e \u0441\u0447\u0435\u0442\u043e\u0432. \u041c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n\n\n\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u00abclick\u00bb \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f MouseEvent (\u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c \u043c\u044b\u0448\u0438). MouseEvent \u2014 \u044d\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 UIEvent (\u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u043c Event (\u0441\u043e\u0431\u044b\u0442\u0438\u0435).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/xx\/w_\/lm\/xxw_lm5wntfjy2dqadvf5fydvjo.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: HTML Elements (\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b) \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 Nodes (\u0443\u0437\u043b\u043e\u0432). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0443\u0437\u043b\u043e\u0432.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/lm\/mz\/87\/lmmz873cfa_oogckfcokjkuqny8.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/h6>\n\n\n\n<p>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u0442\u0430\u043a \u0438 \u0432 \u0424\u0424. \u0412 \u0424\u0424 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u00ab\u0447\u0438\u0449\u0435\u00bb, \u043d\u043e \u044d\u0442\u043e \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0434 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438.<\/p>\n\n\n\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435.<\/p>\n\n\n\n<h3>\u041a\u043b\u0430\u0441\u0441\u044b \u043f\u0440\u043e\u0442\u0438\u0432 \u0424\u0424 \u2014 \u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f<\/h3>\n\n\n\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u0441\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0449\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0439, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0441\u043d\u0430\u0440\u0443\u0436\u0438.<\/p>\n\n\n\n<p>\u0412 JavaScript \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n\n\n\n<h6>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f<\/h6>\n\n\n\n<p>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u043e\u0439 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  <em>\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0434\u0435\u0441\u044c, \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0431\u043b\u043e\u0447\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u0431\u043b\u043e\u043a\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const food = 'Hamburger'\n\n{\n  console.log(food)\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/6w\/fp\/g8\/6wfpg8hz_mhxs9o40e6ekomlrge.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041d\u043e \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  const food = 'Hamburger'\n}\n\nconsole.log(food)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/zl\/_t\/py\/zl_tpyghfxxxumza4_8zykqrjgg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u00abvar\u00bb, \u0438\u043c\u0435\u044e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043b\u0438 \u0444\u0443\u043a\u043d\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c var \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<h6>\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h6>\n\n\n\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0431\u043b\u043e\u0447\u043d\u0443\u044e. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0435. \u042d\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u0434\u0430\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e var.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function sayFood () {\n  const food = 'Hamburger'\n}\n\nsayFood()\nconsole.log(food)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/im\/xl\/mf\/imxlmfe_blprhtj70vqyhlymrnw.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u0436\u0435 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u043e \u0438\u043c\u0435\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0437\u0430 \u0435\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const food = 'Hamburger'\n\nfunction sayFood () {\n  console.log(food)\n}\n\nsayFood()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/6w\/fp\/g8\/6wfpg8hz_mhxs9o40e6ekomlrge.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function sayFood () {\n  return 'Hamburger'\n}\n\nconsole.log(sayFood())\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/6w\/fp\/g8\/6wfpg8hz_mhxs9o40e6ekomlrge.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u0417\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435<\/h6>\n\n\n\n<p>\u0417\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f<\/em>\nfunction outsideFunction () {\n  function insideFunction () { <em>\/* ... *\/<\/em> }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 outsideFunction, \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 insideFunction.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function outsideFunction () {\n  const food = 'Hamburger'\n  console.log('Called outside')\n\n  return function insideFunction () {\n    console.log('Called inside')\n    console.log(food)\n  }\n}\n\n<em>\/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c outsideFunction, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 insideFunction<\/em>\n<em>\/\/ \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c insideFunction \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \"fn\"<\/em>\nconst fn = outsideFunction()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/mj\/8k\/f_\/mj8kf_fkmxiidc74okzy-vsgaxg.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f \u0438 \u041e\u041e\u041f<\/h6>\n\n\n\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u043d\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u044b\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c\u0438 (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438), \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c\u0438 (\u0447\u0430\u0441\u0442\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c\u0438).<\/p>\n\n\n\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440. \u0421\u043a\u0430\u0436\u0435\u043c, \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u00abCar\u00bb. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u00abfuel\u00bb (\u0442\u043e\u043f\u043b\u0438\u0432\u043e) \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c 50.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  constructor () {\n    this.fuel = 50\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0442\u043e\u043f\u043b\u0438\u0432\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const car = new Car()\nconsole.log(car.fuel) <em>\/\/ 50<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043f\u043b\u0438\u0432\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const car = new Car()\ncar.fuel = 3000\nconsole.log(car.fuel) <em>\/\/ 3000<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044f \u0432\u043c\u0435\u0449\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 100 \u043b\u0438\u0442\u0440\u043e\u0432 \u0442\u043e\u043f\u043b\u0438\u0432\u0430. \u041c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u043c\u0435\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043f\u043b\u0438\u0432\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043b\u043e\u043c\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443.<\/p>\n\n\n\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n\n\n\n<ul><li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044e<\/li><li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439<\/li><\/ul>\n\n\n\n<h6>\u0427\u0430\u0441\u0442\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044e<\/h6>\n\n\n\n<p>\u0412 JavaScript \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043e\u0431\u044b\u0447\u043d\u043e, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  constructor () {\n    <em>\/\/ \u041e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \"fuel\" \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043d\u043e\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430<\/em>\n    this._fuel = 50\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  constructor () {\n    this._fuel = 50\n  }\n\n  getFuel () {\n    return this._fuel\n  }\n\n  setFuel (value) {\n    this._fuel = value\n    <em>\/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0430\u043a\u0430<\/em>\n    if (value &gt; 100) this._fuel = 100\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u043e\u043f\u043b\u0438\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u00abgetFuel\u00bb \u0438 \u00absetFuel\u00bb, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const car = new Car()\nconsole.log(car.getFuel()) <em>\/\/ 50<\/em>\n\ncar.setFuel(3000)\nconsole.log(car.getFuel()) <em>\/\/ 100<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u041d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8220;_fuel&#8221; \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043d\u043e\u0439. \u041e\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0438\u0437\u0432\u043d\u0435.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const car = new Car()\nconsole.log(car.getFuel()) <em>\/\/ 50<\/em>\n\ncar._fuel = 3000\nconsole.log(car.getFuel()) <em>\/\/ 3000<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f.<\/p>\n\n\n\n<h6>\u041f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f<\/h6>\n\n\n\n<p>\u041f\u043e\u043b\u044f \u2014 \u044d\u0442\u043e \u0442\u0435\u0440\u043c\u0438\u043d, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n\n\n\n<h6>\u0427\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h6>\n\n\n\n<p>\u041a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 &#8220;#&#8221;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  constructor () {\n    this.#fuel = 50\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/s7\/bi\/bv\/s7bibvildoohezbleukmzuzqbmk.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0427\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u043d\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  <em>\/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<\/em>\n  #fuel\n  constructor () {\n    <em>\/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0435<\/em>\n    this.#fuel = 50\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  #fuel = 50\n}\n<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8220;#fuel&#8221; \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044e \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const car = new Car()\nconsole.log(car.#fuel)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/s7\/bi\/bv\/s7bibvildoohezbleukmzuzqbmk.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  #fuel = 50\n\n  getFuel () {\n    return this.#fuel\n  }\n\n  setFuel (value) {\n    this.#fuel = value\n    if (value &gt; 100) this.#fuel = 100\n  }\n}\n\nconst car = new Car()\nconsole.log(car.getFuel()) <em>\/\/ 50<\/em>\n\ncar.setFuel(3000)\nconsole.log(car.getFuel()) <em>\/\/ 100<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u041b\u0438\u0447\u043d\u043e \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b. \u042f \u043d\u0430\u0445\u043e\u0436\u0443 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car {\n  #fuel = 50\n\n  get fuel () {\n    return this.#fuel\n  }\n\n  set fuel (value) {\n    this.#fuel = value\n    if (value &gt; 100) this.#fuel = 100\n  }\n}\n\nconst car = new Car()\nconsole.log(car.fuel) <em>\/\/ 50<\/em>\n\ncar.fuel = 3000\nconsole.log(car.fuel) <em>\/\/ 100<\/em>\n<\/code><\/pre>\n\n\n\n<h6>\u0427\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0424\u0424<\/h6>\n\n\n\n<p>\u0424\u0424 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437\u0432\u043d\u0435. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0431\u043b\u043e\u0447\u043d\u0443\u044e (\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e) \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0442.\u0435. \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Car () {\n  const fuel = 50\n}\n\nconst car = new Car()\nconsole.log(car.fuel) <em>\/\/ undefined<\/em>\nconsole.log(fuel) <em>\/\/ Error: \"fuel\" is not defined<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u00abfuel\u00bb \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0433\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Car () {\n  const fuel = 50\n\n  return {\n    get fuel () {\n      return fuel\n    },\n\n    set fuel (value) {\n      fuel = value\n      if (value &gt; 100) fuel = 100\n    }\n  }\n}\n\nconst car = new Car()\nconsole.log(car.fuel) <em>\/\/ 50<\/em>\n\ncar.fuel = 3000\nconsole.log(car.fuel) <em>\/\/ 100<\/em>\n<\/code><\/pre>\n\n\n\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a. \u041b\u0435\u0433\u043a\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e!<\/p>\n\n\n\n<h6>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438<\/h6>\n\n\n\n<p>\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0424\u0424 \u043f\u0440\u043e\u0449\u0435 \u0438 \u043b\u0435\u0433\u0447\u0435 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f. \u041e\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e JavaScript.<\/p>\n\n\n\n<p>\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 &#8220;#&#8221;, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n\n\n\n<h3>\u041a\u043b\u0430\u0441\u0441\u044b \u043f\u0440\u043e\u0442\u0438\u0432 \u0424\u0424 \u2014 this<\/h3>\n\n\n\n<p>this \u2014 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0442\u0438\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041f\u043e\u0447\u0435\u043c\u0443? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0433\u0434\u0435 \u0438 \u043a\u0430\u043a this \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 this \u0447\u0430\u0441\u0442\u043e \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u043d\u043e \u0438 \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n\n\n\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f this \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u0441\u043b\u043e\u0436\u043d\u0430. \u0412\u0441\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 6 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f this. \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0432 \u044d\u0442\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\u0445, \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 this.<\/p>\n\n\n\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n\n\n\n<ul><li>\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442<\/li><li>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/li><li>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/li><li>\u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/li><li>\u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/li><li>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/li><\/ul>\n\n\n\n<p>\u041d\u043e \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u0442\u0430\u0442\u044c\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f this \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0438 \u0424\u0424.<\/p>\n\n\n\n<h6>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 this \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445<\/h6>\n\n\n\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 this \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 (\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\/\u043c\u0435\u0442\u043e\u0434\u0430). \u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 constructor.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Human {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastName = lastName\n    console.log(this)\n  }\n}\n\nconst chris = new Human('Chris', 'Coyier')\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/q7\/y0\/ma\/q7y0mael2her44f-pprqsrhuucw.png\" alt=\"\"\/><\/figure>\n\n\n\n<h6>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 this \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445<\/h6>\n\n\n\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 this \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 new \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, this \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  this.firstName = firstName\n  this.lastName = lastName\n  console.log(this)\n}\n\nconst chris = new Human('Chris', 'Coyier')\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/z-\/40\/tp\/z-40tpaqgjlwpvbt5dawybxufyi.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0424\u041a \u0432 \u0424\u0424 this \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 window (\u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044f this \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00abundefined\u00bb).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \"new\"<\/em>\nfunction Human (firstName, lastName) {\n  this.firstName = firstName\n  this.lastName = lastName\n  console.log(this)\n}\n\nconst chris = Human('Chris', 'Coyier')\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/pv\/is\/ed\/pvisedt-n2-8zju9d4e0ukfxc0u.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0424\u0424 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c this. \u0412 \u044d\u0442\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043e\u0442\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0424\u0424 \u0438 \u0424\u041a.<\/p>\n\n\n\n<h6>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 this \u0432 \u0424\u0424<\/h6>\n\n\n\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c this \u0432 \u0424\u0424, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\/\u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  return {\n    firstName,\n    lastName,\n    sayThis () {\n      console.log(this)\n    }\n  }\n}\n\nconst chris = Human('Chris', 'Coyier')\nchris.sayThis()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/hx\/6-\/_4\/hx6-_4x2guufyceemivc4idxtf8.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c this \u0432 \u0424\u0424, \u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440. \u0422\u0430\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  const human = {\n    firstName,\n    lastName,\n    sayHello() {\n      console.log(`Hi, I'm ${human.firstName}`)\n    }\n  }\n\n  return human\n}\n\nconst chris = Human('Chris', 'Coyier')\nchris.sayHello()\n<\/code><\/pre>\n\n\n\n<p>human.firstName \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c, \u043d\u0435\u0436\u0435\u043b\u0438 this.firstName, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 human \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440.<\/p>\n\n\n\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0430\u043c \u0434\u0430\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c human.firstName. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c\u0441\u044f firstName, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 (\u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  const human = {\n    firstName,\n    lastName,\n    sayHello() {\n      console.log(`Hi, I'm ${firstName}`)\n    }\n  }\n\n  return human\n}\n\nconst chris = Human('Chris', 'Coyier')\nchris.sayHello()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/5r\/nx\/10\/5rnx10f8sgov7zw-ngxhol_xjqa.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n\n\n\n<h3>\u0421\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h3>\n\n\n\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0442\u0430\u043a\u043e\u0432\u044b: \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u00abHuman\u00bb \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u00abfirstName\u00bb \u0438 \u00ablastName\u00bb \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u00absayHello\u00bb.<\/p>\n\n\n\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u00abDeveloper\u00bb, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043e\u0442 Human. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u043c\u0435\u044e\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443 \u043d\u0438\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u00abcode\u00bb. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u044f\u0432\u043b\u044f\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u043a\u0430\u0441\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u00absayHello\u00bb.<\/p>\n\n\n\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0424\u0424.<\/p>\n\n\n\n<h6>\u041a\u043b\u0430\u0441\u0441\u044b<\/h6>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u00abHuman\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Human {\n  constructor (firstName, lastName) {\n    this.firstName = firstName\n    this.lastname = lastName\n  }\n\n  sayHello () {\n    console.log(`Hello, I'm ${this.firstName}`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u00abDeveloper\u00bb \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u00abcode\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Developer extends Human {\n  code (thing) {\n    console.log(`${this.firstName} coded ${thing}`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u00absayHello\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Developer extends Human {\n  code (thing) {\n    console.log(`${this.firstName} coded ${thing}`)\n  }\n\n  sayHello () {\n    super.sayHello()\n    console.log(`I'm a developer`)\n  }\n}\n<\/code><\/pre>\n\n\n\n<h6>\u0424\u0424 (\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c this)<\/h6>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u00abHuman\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human () {\n  return {\n    firstName,\n    lastName,\n    sayHello () {\n      console.log(`Hello, I'm ${this.firstName}`)\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u00abDeveloper\u00bb \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u00abcode\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Developer (firstName, lastName) {\n  const human = Human(firstName, lastName)\n  return Object.assign({}, human, {\n    code (thing) {\n      console.log(`${this.firstName} coded ${thing}`)\n    }\n  })\n}\n<\/code><\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u00absayHello\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Developer (firstName, lastName) {\n  const human = Human(firstName, lastName)\n  return Object.assign({}, human, {\n    code (thing) {\n      console.log(`${this.firstName} coded ${thing}`)\n    },\n\n    sayHello () {\n      human.sayHello()\n      console.log('I\\'m a developer')\n    }\n  })\n}\n<\/code><\/pre>\n\n\n\n<h6>\u0424\u0424 (\u0431\u0435\u0437 this)<\/h6>\n\n\n\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 firstName \u0437\u0430 \u0441\u0447\u0435\u0442 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Human (firstName, lastName) {\n  return {\n    <em>\/\/ ...<\/em>\n    sayHello () {\n      console.log(`Hello, I'm ${firstName}`)\n    }\n  }\n}\n\nfunction Developer (firstName, lastName) {\n  <em>\/\/ ...<\/em>\n  return Object.assign({}, human, {\n    code (thing) {\n      console.log(`${firstName} coded ${thing}`)\n    },\n\n    sayHello () { <em>\/* ... *\/<\/em> }\n  })\n}\n<\/code><\/pre>\n\n\n\n<h6>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e this<\/h6>\n\n\n\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043a\u043b\u0430\u0441\u0441\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f this, \u0430 \u0424\u0424 \u043d\u0435\u0442. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0424\u0424, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443:<\/p>\n\n\n\n<ul><li>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 this \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f<\/li><li>\u043a\u043e\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0424\u0424, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u0438 \u0447\u0438\u0441\u0442\u044b\u043c (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445)<\/li><\/ul>\n\n\n\n<h3>\u041a\u043b\u0430\u0441\u0441\u044b \u043f\u0440\u043e\u0442\u0438\u0432 \u0424\u0424 \u2014 \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/h3>\n\n\n\n<p>\u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043f\u043e \u041e\u041e\u041f \u0443\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0432\u0438\u0434\u0443 \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043a\u0430\u043a \u0444\u0440\u043e\u043d\u0434\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u0418\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 this, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043d\u0438\u043c\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0439. \u0412 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u0424\u0424 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442.<\/p>\n\n\n\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 this \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n\n\n\n<h6>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430<\/h6>\n\n\n\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/p>\n\n\n\n<p>\u041d\u0430\u0448 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0449\u0438:<\/p>\n\n\n\n<ul><li>\u0441\u0430\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a<\/li><li>\u043a\u043d\u043e\u043f\u043a\u0443 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/wf\/gx\/if\/wfgxifgrs2srwb08t1ny4qyjfhi.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"counter\"&gt;\n  &lt;p&gt;Count: &lt;span&gt;0&lt;\/span&gt;&lt;\/p&gt;\n  &lt;button&gt;Increase Count&lt;\/button&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n\n\n\n<h6>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430<\/h6>\n\n\n\n<p>\u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0439\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0443 \u00abCounter\u00bb:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  constructor (counter) {\n    <em>\/\/ ...<\/em>\n  }\n}\n\n<em>\/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/em>\nconst counter = new Counter(document.querySelector('.counter'))\n<\/code><\/pre>\n\n\n\n<p>\u0412 \u043a\u043b\u0430\u0441\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c 2 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n\n\n\n<ul><li>&lt;span&gt;, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u2014 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430<\/li><li>&lt;button&gt; \u2014 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  constructor (counter) {\n    this.countElement = counter.querySelector('span')\n    this.buttonElement = counter.querySelector('button')\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u00abcount\u00bb \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c countElement. \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0447\u0430\u0441\u0442\u043d\u043e\u0439.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  #count\n  constructor (counter) {\n    <em>\/\/ ...<\/em>\n\n    this.#count = parseInt(countElement.textContent)\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 1. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u00abincreaseCount\u00bb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  #count\n  constructor (counter) { <em>\/* ... *\/<\/em> }\n\n  increaseCount () {\n    this.#count = this.#count + 1\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c DOM. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u00abupdateCount\u00bb, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0438 increaseCount:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  #count\n  constructor (counter) { <em>\/* ... *\/<\/em> }\n\n  increaseCount () {\n    this.#count = this.#count + 1\n    this.updateCount()\n  }\n\n  updateCount () {\n    this.countElement.textContent = this.#count\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n\n\n\n<h6>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/h6>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a this.buttonElement. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c increaseCount \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  <em>\/\/ ...<\/em>\n\n  constructor (counter) {\n    <em>\/\/ ...<\/em>\n    this.buttonElement.addEventListener('click', this.increaseCount)\n  }\n\n  <em>\/\/ \u041c\u0435\u0442\u043e\u0434\u044b<\/em>\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/dt\/wb\/zj\/dtwbzj5ypnsddwodlt4c4oi2b_8.gif\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e this \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 buttonElement (\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439). \u0412 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/habrastorage.org\/webt\/od\/z0\/4l\/odz04lg-0uulik07bsoqbhg0lmi.gif\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n\n\n\n<ul><li>\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bind<\/li><li>\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u0444\u0443\u043a\u043d\u0446\u0438\u0438<\/li><\/ul>\n\n\n\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 (\u043e\u0434\u043d\u0430\u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0449\u0435).<\/p>\n\n\n\n<h6>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bind<\/h6>\n\n\n\n<p>bind \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c this (\u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 this \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  <em>\/\/ ...<\/em>\n\n  constructor (counter) {\n    <em>\/\/ ...<\/em>\n    this.buttonElement.addEventListener('click', this.increaseCount.bind(this))\n  }\n\n  <em>\/\/ ...<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 bind \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c.<\/p>\n\n\n\n<h6>\u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h6>\n\n\n\n<p>\u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e this. \u041e\u043d\u0438 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u044e\u0442 \u0435\u0433\u043e \u0438\u0437 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e (\u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e) \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u0434 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  <em>\/\/ ...<\/em>\n\n  constructor (counter) {\n    <em>\/\/ ...<\/em>\n    this.buttonElement.addEventListener('click', () =&gt; {\n      this.increaseCount()\n    })\n  }\n\n  <em>\/\/ \u041c\u0435\u0442\u043e\u0434\u044b<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c increaseCount \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 this \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\n  <em>\/\/ ...<\/em>\n\n  constructor (counter) {\n    <em>\/\/ ...<\/em>\n    this.buttonElement.addEventListener('click', this.increaseCount)\n  }\n\n  increaseCount = () =&gt; {\n    this.#count = this.#count + 1\n    this.updateCounter()\n  }\n\n  <em>\/\/ ...<\/em>\n}\n<\/code><\/pre>\n\n\n\n<h6>\u041a\u043e\u0434<\/h6>\n\n\n\n<p>\u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n\n\n\n<p>https:\/\/codepen.io\/zellwk\/embed\/preview\/VwabbEE?height=300&#038;slug-hash=VwabbEE&#038;default-tabs=js%2Cresult&#038;host=https%3A%2F%2Fcodepen.io<\/p>\n\n\n\n<h6>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0424\u0424<\/h6>\n\n\n\n<p>\u041d\u0430\u0447\u0430\u043b\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u2014 \u043c\u044b \u043f\u0440\u043e\u0441\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0439\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counter) {\n  <em>\/\/ ...<\/em>\n}\n\nconst counter = Counter(document.querySelector('.counter'))\n<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0443\u0442 \u0447\u0430\u0441\u0442\u043d\u044b\u043c\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counter) {\n  const countElement = counter.querySelector('span')\n  const buttonElement = counter.querySelector('button')\n}\n<\/code><\/pre>\n\n\n\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u00abcount\u00bb:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counter) {\n  const countElement = counter.querySelector('span')\n  const buttonElement = counter.querySelector('button')\n\n  let count = parseInt(countElement.textContext)\n}\n<\/code><\/pre>\n\n\n\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u00abincreaseCount\u00bb. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u043e \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counter) {\n  <em>\/\/ ...<\/em>\n  const counter = {\n    increaseCount () {\n      count = count + 1\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>DOM \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u00abupdateCount\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 increaseCount:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counter) {\n  <em>\/\/ ...<\/em>\n  const counter = {\n    increaseCount () {\n      count = count + 1\n      counter.updateCount()\n    },\n\n    updateCount () {\n      increaseCount()\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e this.updateCount \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c counter.updateCount.<\/p>\n\n\n\n<h6>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/h6>\n\n\n\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043a buttonElement, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f counter.increaseCount \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043b\u0431\u044d\u043a\u0430.<\/p>\n\n\n\n<p>\u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c this, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043d\u0430\u0441 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u0435\u043d\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counterElement) {\n  <em>\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/em>\n\n  <em>\/\/ \u041c\u0435\u0442\u043e\u0434\u044b<\/em>\n  const counter = { <em>\/* ... *\/<\/em> }\n\n  <em>\/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/em>\n  buttonElement.addEventListener('click', counter.increaseCount)\n}\n<\/code><\/pre>\n\n\n\n<h6>\u041f\u0435\u0440\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c this<\/h6>\n\n\n\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c this \u0432 \u0424\u0424, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n\n\n\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 counter.increaseCount \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d counter.updateCount, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 this \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 counter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counterElement) {\n  <em>\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/em>\n\n  <em>\/\/ \u041c\u0435\u0442\u043e\u0434\u044b<\/em>\n  const counter = {\n    increaseCount() {\n      count = count + 1\n      this.updateCount()\n    }\n  }\n\n  <em>\/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/em>\n  buttonElement.addEventListener('click', counter.increaseCount)\n}\n<\/code><\/pre>\n\n\n\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c. \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bind, \u043d\u043e \u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n\n\n\n<h6>\u0412\u0442\u043e\u0440\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c this<\/h6>\n\n\n\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0424\u0424, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442.\u0435. this \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Counter (counterElement) {\n  <em>\/\/ ...<\/em>\n  const counter = {\n    <em>\/\/ \u041d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u0430\u043a<\/em>\n    <em>\/\/ \u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 this \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 window<\/em>\n    increaseCount: () =&gt; {\n      count = count + 1\n      this.updateCount()\n    }\n  }\n  <em>\/\/ ...<\/em>\n}\n<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0424\u0424 \u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f this.<\/p>\n\n\n\n<h6>\u041a\u043e\u0434<\/h6>\n\n\n\n<p>https:\/\/codepen.io\/zellwk\/embed\/preview\/WNwjjaQ?height=300&#038;slug-hash=WNwjjaQ&#038;default-tabs=js%2Cresult&#038;host=https%3A%2F%2Fcodepen.io<\/p>\n\n\n\n<h6>\u0412\u0435\u0440\u0434\u0438\u043a\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/h6>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043c\u0435\u043d\u044f\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c this \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0422\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0443\u0441\u043b\u0443\u0433\u0430\u043c bind.<\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0424\u0424 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0431\u0435\u0437 this.<\/p>\n\n\n\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n\n\n\n<p>\u0418\u0442\u0430\u043a, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 JavaScript:<\/p>\n\n\n\n<ul><li>\u0424\u0443\u043d\u043a\u0446\u0438\u0438-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b<\/li><li>\u041a\u043b\u0430\u0441\u0441\u044b<\/li><li>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li><li>\u0424\u0430\u0431\u0440\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/li><\/ul>\n\n\n\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0424\u0424.<\/p>\n\n\n\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u043b\u0435\u0433\u0447\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0424\u0424.<\/p>\n\n\n\n<p>\u0412-\u0442\u0440\u0435\u0442\u044c\u0438\u0445, \u043c\u044b \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0447\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e\u0431 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438, \u0424\u0424 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0434 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 &#8220;#&#8221;, \u0430 \u0424\u0424 \u0434\u0435\u043b\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u043c\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n\n\n\n<p>\u0412-\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0445, \u0424\u0424 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f this \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440. \u0412 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u044f\u043c, \u0434\u0430\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c this \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 JavaScript \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 4 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[132],"tags":[95],"_links":{"self":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/1777"}],"collection":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1777"}],"version-history":[{"count":1,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/1777\/revisions"}],"predecessor-version":[{"id":1778,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/1777\/revisions\/1778"}],"wp:attachment":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}