{"id":310878,"date":"2020-10-02T15:00:37","date_gmt":"2020-10-02T15:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310878"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310878","title":{"rendered":"\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 ECMAScript, \u0447\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/521768\/\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/users\/xfides\/\" class=\"user_link\">xfides<\/a> <\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/v8.dev\/blog\/understanding-ecmascript-part-2\">\u0410\u0432\u0442\u043e\u0440 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430: Marja H\u00f6ltt\u00e4<\/a><br \/>  <a href=\"https:\/\/habr.com\/ru\/post\/490084\/\">\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/a><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zw\/5v\/0n\/zw5v0nunquuboemygpmoryc3czg.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u043f\u043e\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u0435\u043c\u0441\u044f \u0432&nbsp;\u0447\u0442\u0435\u043d\u0438\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0432\u044b&nbsp;\u043d\u0435&nbsp;\u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0435\u0435&nbsp;\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c. \u0412&nbsp;\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b&nbsp;\u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441&nbsp;\u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <em>Object.prototype.hasOwnProperty<\/em>. \u0422\u0430\u043a\u0436\u0435, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a <strong>\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0415\u0449\u0435 \u043c\u044b&nbsp;\u0443\u0437\u043d\u0430\u043b\u0438 \u043e&nbsp;<strong>\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f\u0445 \u00ab?\u00bb<\/strong> \u0438 <strong>\u00ab!\u00bb<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441&nbsp;\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043e\u043a. \u0418&nbsp;\u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b&nbsp;\u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e&nbsp;<strong>\u0442\u0438\u043f\u0430\u0445 \u044f\u0437\u044b\u043a\u0430, \u0442\u0438\u043f\u0430\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0441\u043b\u043e\u0442\u0430\u0445 \u0438&nbsp;\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445.<\/strong><\/p>\n<p>  <\/p>\n<h1 id=\"gotovy-dlya-vtoroy-chasti\">\u0413\u043e\u0442\u043e\u0432\u044b \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438?<\/h1>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435! \u042d\u0442\u043e\u0442 \u044d\u043f\u0438\u0437\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043f\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0438\u0437&nbsp;\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 ECMAScript \u043e\u0442&nbsp;\u0444\u0435\u0432\u0440\u0430\u043b\u044f 2020&nbsp;\u0433\u043e\u0434\u0430. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043e&nbsp;\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b&nbsp;\u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0449\u0443\u0442\u0441\u044f \u043f\u043e&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0435: \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435&nbsp;\u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u043c\u044b&nbsp;\u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0432\u0432\u0435\u0440\u0445 \u043f\u043e&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0435, \u043f\u043e\u043a\u0430 \u043d\u0435&nbsp;\u043d\u0430\u0439\u0434\u0435\u043c \u0435\u0433\u043e, \u0438\u043b\u0438 \u043f\u043e\u043a\u0430 \u043d\u0435&nbsp;\u043d\u0430\u0439\u0434\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0443&nbsp;\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435&nbsp;\u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const o1 = { foo: 99 }; const o2 = {}; Object.setPrototypeOf(o2, o1); o2.foo; \/\/ \u2192 99<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"gde-opredelyaetsya-algoritm-hozhdeniya-ponbspprototipnoy-cepochke\">\u0413\u0434\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0435?<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0430\u0439\u0442\u0438, \u0433\u0434\u0435 \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e. \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u0442\u0430\u0440\u0442&nbsp;&mdash; \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043e&nbsp;\u0441\u043f\u0438\u0441\u043a\u0430 <a href=\"https:\/\/tc39.es\/ecma262\/#sec-object-internal-methods-and-internal-slots\">\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/a><\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <em>[[GetOwnProperty]]<\/em> \u0438 <em>[[Get]]<\/em>. \u041d\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u043e\u0439&nbsp;&mdash; \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <em>[[Get]]<\/em>. \u041a&nbsp;\u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, <a href=\"https:\/\/tc39.es\/ecma262\/#sec-property-descriptor-specification-type\">\u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432&nbsp;\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/a> \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u043b\u0435 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <em>[[Get]]<\/em>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0438\u0442\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e&nbsp;\u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0435 \u0438\u043b\u0438 \u043e\u0431&nbsp;\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435.<\/p>\n<p>  <\/p>\n<p><em>[[Get]]<\/em> &mdash; \u044d\u0442\u043e <strong>\u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/strong>. \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f <strong>\u041e\u0431\u044b\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <em>(\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430)<\/em> \u043f\u043e&nbsp;\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f <strong>\u042d\u043a\u0437\u043e\u0442\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong> \u043c\u043e\u0433\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <em>[[Get]]<\/em>, \u043b\u043e\u0433\u0438\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442&nbsp;\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e&nbsp;\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0412&nbsp;\u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b&nbsp;\u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430&nbsp;\u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <a href=\"https:\/\/tc39.es\/ecma262\/#sec-ordinary-object-internal-methods-and-internal-slots-get-p-receiver\"> <em>[[Get]] ( P, Receiver )<\/em>.<\/a> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <em>OrdinaryGet<\/em>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <em>[[Get]]<\/em> \u043e\u0442&nbsp;\u043e\u0431\u044a\u0435\u043a\u0442\u0430 <strong>\u00ab\u041e\u00bb<\/strong> \u0441\u043e&nbsp;\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <strong>\u00ab\u0420\u00bb<\/strong> \u0438&nbsp;ECMAScript \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c Receiver, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">    1. Return ? OrdinaryGet(O, P, Receiver).<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u043a\u043e\u0440\u0435 \u043c\u044b&nbsp;\u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e Receiver&nbsp;&mdash; \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a <strong>this \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/strong>, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u0435\u0442\u0442\u0435\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430-\u0430\u043a\u0446\u0435\u0441\u0441\u043e\u0440\u0430.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/tc39.es\/ecma262\/#sec-ordinaryget\"> <em>OrdinaryGet(O, P, Receiver)<\/em><\/a> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">1.  Assert: IsPropertyKey(P) is true. 2.  Let desc be ? O.[[GetOwnProperty]](P). 3.  If desc is undefined, then         a. Let parent be ? O.[[GetPrototypeOf]]().         b. If parent is null, return undefined.         c. Return ? parent.[[Get]](P, Receiver). 4.  If IsDataDescriptor(desc) is true, return desc.[[Value]]. 5.  Assert: IsAccessorDescriptor(desc) is true. 6.  Let getter be desc.[[Get]]. 7.  If getter is undefined, return undefined. 8.  Return ? Call(getter, Receiver).<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0438\u0434\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0448\u0430\u0433\u0430: \u0435\u0441\u043b\u0438 \u043c\u044b&nbsp;\u043d\u0435&nbsp;\u043d\u0430\u0448\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u043c\u044b&nbsp;\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u044b\u0439 <em>[[Get]]<\/em> \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <em>OrdinaryGet<\/em>. \u0415\u0441\u043b\u0438 \u043c\u044b&nbsp;\u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435&nbsp;\u043d\u0430\u0448\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u043c\u044b&nbsp;\u0432\u043d\u043e\u0432\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u044b\u0439 <em>[[Get]]<\/em> \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u044f\u0442\u044c&nbsp;\u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 <em>OrdinaryGet<\/em>. \u0422\u0430\u043a \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u043e&nbsp;\u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043c\u044b&nbsp;\u043d\u0435&nbsp;\u043d\u0430\u0439\u0434\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0438\u043b\u0438 \u043d\u0435&nbsp;\u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u043c \u0440\u0430\u0432\u043d\u044b\u043c null.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b&nbsp;\u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a <em>o2.foo<\/em>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b&nbsp;\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <em>OrdinaryGet<\/em> \u0438&nbsp;\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432&nbsp;\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <strong>\u00ab\u041e\u00bb<\/strong> \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00ab\u043e2\u00bb<\/strong>, \u0430&nbsp;\u0432&nbsp;\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <strong>\u00ab\u0420\u00bb<\/strong>&nbsp;&mdash; \u0438\u043c\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <strong>\u00abfoo\u00bb<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a <em>O.[[GetOwnProperty]](\u00abfoo\u00bb)<\/em> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <em>undefined<\/em>, \u043c\u044b&nbsp;\u0438\u0434\u0435\u043c \u0432&nbsp;\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e if&nbsp;\u0432&nbsp;\u0448\u0430\u0433\u0435&nbsp;3, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00abo2\u00bb<\/strong> \u043d\u0435&nbsp;\u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c <strong>\u00abfoo\u00bb<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0412&nbsp;\u0448\u0430\u0433\u0435 3.a, \u043c\u044b&nbsp;\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432&nbsp;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <strong>\u00abparent\u00bb<\/strong> \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <strong>\u00abo2\u00bb<\/strong>&nbsp;&mdash; \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00abo1\u00bb<\/strong>. \u0422\u0430\u043a \u043a\u0430\u043a <strong>\u00abparent\u00bb<\/strong> \u043d\u0435 <em>null<\/em>, \u043c\u044b&nbsp;\u043d\u0435&nbsp;\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 if&nbsp;\u043d\u0430&nbsp;\u0448\u0430\u0433\u0435 3.b.<\/p>\n<p>  <\/p>\n<p>\u0412&nbsp;\u0448\u0430\u0433\u0435 3.\u0441 \u043c\u044b&nbsp;\u0432\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>[[Get]]<\/em> \u0441&nbsp;\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <strong>\u00abfoo\u00bb<\/strong> \u0438&nbsp;\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0422\u0430\u043a \u043a\u0430\u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00abo1\u00bb<\/strong>&nbsp;&mdash; \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e&nbsp;\u043c\u0435\u0442\u043e\u0434 <em>[[Get]]<\/em> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <em>OrdinaryGet<\/em> \u0441\u043d\u043e\u0432\u0430. \u0412&nbsp;\u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432&nbsp;\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <strong>\u00ab\u041e\u00bb<\/strong> \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 <strong>\u00ab\u043e1\u00bb<\/strong>, \u0430&nbsp;\u0432&nbsp;<strong>\u00ab\u0420\u00bb<\/strong> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f <strong>\u00abfoo\u00bb<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430&nbsp;\u0448\u0430\u0433\u0435 2&nbsp;\u043c\u0435\u0442\u043e\u0434 <em>O.[[GetOwnProperty]](\u00abfoo\u00bb)<\/em> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043e&nbsp;\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440, \u0438&nbsp;\u043c\u044b&nbsp;\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432&nbsp;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>desc<\/em>.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/tc39.es\/ecma262\/#sec-property-descriptor-specification-type\">\u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430<\/a>&nbsp;&mdash; \u044d\u0442\u043e \u0442\u0438\u043f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u044f\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432&nbsp;\u043f\u043e\u043b\u0435 <em>[[Value]]<\/em>. \u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0430\u043a\u0446\u0435\u0441\u0441\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0432&nbsp;\u043f\u043e\u043b\u0435 <em>[[Get]]<\/em> \u0438\/\u0438\u043b\u0438 <em>[[Set]]<\/em>. \u0412&nbsp;\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441&nbsp;<strong>\u00abfoo\u00bb<\/strong>&nbsp;&mdash; \u044d\u0442\u043e \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u044b&nbsp;\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u044b&nbsp;\u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0432 <em>desc<\/em> \u043d\u0430&nbsp;\u0448\u0430\u0433\u0435&nbsp;2, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b&nbsp;\u043d\u0435&nbsp;\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 if&nbsp;\u043d\u0430&nbsp;\u0448\u0430\u0433\u0435 3.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b&nbsp;\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0448\u0430\u0433 4. \u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435&nbsp;99, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432&nbsp;\u043f\u043e\u043b\u0435 <em>[[Value]]<\/em> \u043d\u0430&nbsp;\u0448\u0430\u0433\u0435 4. \u0418&nbsp;\u043d\u0430&nbsp;\u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.<\/p>\n<p>  <\/p>\n<h3 id=\"chto-takoe-receiver-inbspotkuda-onnbspvzyalsya\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Receiver \u0438&nbsp;\u043e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d&nbsp;\u0432\u0437\u044f\u043b\u0441\u044f?<\/h3>\n<p>  <\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>Receiver<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432&nbsp;\u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432-\u0430\u043a\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0432&nbsp;\u0448\u0430\u0433\u0435 8. \u041e\u043d&nbsp;\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 <strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this<\/strong>, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u0435\u0442\u0442\u0435\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430-\u0430\u043a\u0446\u0435\u0441\u0441\u043e\u0440\u0430.<\/p>\n<p>  <\/p>\n<p><em>OrdinaryGet<\/em> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 <strong>Receiver<\/strong> \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (\u0448\u0430\u0433 3.c). \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0441\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 <strong>Receiver<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430&nbsp;\u043c\u0435\u0441\u0442\u0435, \u0433\u0434\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>[[Get]]<\/em>, \u0431\u0443\u0434\u0435\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f <em>GetValue<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441&nbsp;Reference. Reference&nbsp;&mdash; \u044d\u0442\u043e \u0442\u0438\u043f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0438&nbsp;\u0444\u043b\u0430\u0433 strict. \u0412&nbsp;\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <em>o2.foo<\/em> \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00abo2\u00bb<\/strong>, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f&nbsp;&mdash; \u0441\u0442\u0440\u043e\u043a\u0430 <strong>\u00abfoo\u00bb<\/strong>, \u0430&nbsp;\u0444\u043b\u0430\u0433 strict&nbsp;&mdash; false.<\/p>\n<p>  <\/p>\n<h3 id=\"otstuplenie-pochemu-tip-reference-nenbspyavlyaetsya-tipom-record\">\u041e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435: \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0438\u043f Reference \u043d\u0435&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0438\u043f\u043e\u043c Record?<\/h3>\n<p>  <\/p>\n<p>\u0422\u0438\u043f Reference \u043d\u0435&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0438\u043f\u043e\u043c Record, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0433\u043b\u043e&nbsp;\u0431\u044b \u0431\u044b\u0442\u044c. \u041e\u043d&nbsp;\u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437&nbsp;\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435. \u041d\u043e&nbsp;\u0432\u0441\u0435&nbsp;\u0436\u0435, \u0442\u0438\u043f Reference \u043d\u0435&nbsp;\u0442\u0438\u043f Record \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e&nbsp;\u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c.<\/p>\n<p>  <\/p>\n<h3 id=\"vernemsya-knbspgetvalue\">\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a&nbsp;GetValue.<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c <a href=\"https:\/\/tc39.es\/ecma262\/#sec-getvalue\">GetValue ( V )<\/a> \u043e\u043f\u0438\u0441\u0430\u043d:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">1.  ReturnIfAbrupt(V). 2.  If Type(V) is not Reference, return V. 3.  Let base be GetBase(V). 4.  If IsUnresolvableReference(V) is true, throw a ReferenceError exception. 5.  If IsPropertyReference(V) is true, then      \u0430.If HasPrimitiveBase(V) is true, then          i.Assert: In this case, base will never be undefined or null.          ii.Set base to ! ToObject(base).      b.Return ? base.[[Get]](GetReferencedName(V),   GetThisValue(V)). 6.  Else,       a.Assert: base is an Environment Record.       b.Return ? base.GetBindingValue(GetReferencedName(V), IsStrictReference(V))<\/code><\/pre>\n<p>  <\/p>\n<p>Reference \u0432&nbsp;\u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e <em>o2.foo<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f property reference.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b&nbsp;\u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432&nbsp;if&nbsp;\u043d\u0430&nbsp;\u0448\u0430\u0433\u0435 5. \u041d\u0435&nbsp;\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430&nbsp;\u0448\u0430\u0433\u0435 5.a, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00ab\u043e2\u00bb<\/strong> \u043d\u0435&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/v8.dev\/blog\/react-cliff#javascript-types\">\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u043c<\/a> (\u0447\u0438\u0441\u043b\u043e, \u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u0438\u043c\u0432\u043e\u043b, BigInt, Boolean, Undefined, \u0438\u043b\u0438 Null).<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b&nbsp;\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <em>[[Get]]<\/em> \u043d\u0430&nbsp;\u0448\u0430\u0433\u0435 5.b. <strong>Receiver<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b&nbsp;\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c&nbsp;&mdash; \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0441\u043b\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <em>GetThisValue(V)<\/em>. \u0412&nbsp;\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <a href=\"https:\/\/tc39.es\/ecma262\/#sec-getthisvalue\">GetThisValue( V )<\/a> \u0432\u0435\u0440\u043d\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b Reference:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">1.  Assert: IsPropertyReference(V) is true. 2.  If IsSuperReference(V) is true, then         a.Return the value of the thisValue component of the reference V. 3.  Return GetBase(V).<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <em>o2.foo<\/em>, \u043c\u044b&nbsp;\u043d\u0435&nbsp;\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c if&nbsp;\u043d\u0430&nbsp;\u0448\u0430\u0433\u0435&nbsp;2, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>o2.foo<\/em> \u043d\u0435&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Super Reference(\u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <em>super.foo<\/em>), \u043e\u0434\u043d\u0430\u043a\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0448\u0430\u0433 3&nbsp;\u0438&nbsp;\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b Reference, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00abo2\u00bb<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0432 \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435, \u043c\u044b&nbsp;\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b&nbsp;\u0437\u0430\u0434\u0430\u0435\u043c <strong>Receiver<\/strong> \u0431\u044b\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 Reference, \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b&nbsp;\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u043c \u0432\u043e&nbsp;\u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0438. \u0418, \u0432&nbsp;\u0438\u0442\u043e\u0433\u0435, \u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b&nbsp;\u043d\u0430\u0448\u043b\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c-\u0430\u043a\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c, \u043c\u044b&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <strong>Receiver<\/strong> \u043a\u0430\u043a <strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this.<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412&nbsp;\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this<\/strong> \u0432\u043d\u0443\u0442\u0440\u0438 \u0433\u0435\u0442\u0442\u0435\u0440\u0430 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430&nbsp;\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0433\u0434\u0435 \u043c\u044b&nbsp;\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0430&nbsp;\u043d\u0435&nbsp;\u043d\u0430&nbsp;\u0442\u043e\u0442, \u0433\u0434\u0435 \u043c\u044b&nbsp;\u043d\u0430\u0448\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u043e&nbsp;\u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0435.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c!<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const o1 = { x: 10, get foo() { return this.x; } }; const o2 = { x: 50 }; Object.setPrototypeOf(o2, o1); o2.foo; \/\/ \u2192 50<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412&nbsp;\u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443&nbsp;\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e-\u0430\u043a\u0446\u0441\u0435\u0441\u0441\u043e\u0440 \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c <strong>\u00abfoo\u00bb<\/strong>, \u0438&nbsp;\u043c\u044b&nbsp;\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0433\u0435\u0442\u0442\u0435\u0440 \u0434\u043b\u044f \u043d\u0435\u0433\u043e. \u0413\u0435\u0442\u0442\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <strong>\u00abthis.x.\u00bb<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b&nbsp;\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>o2.foo<\/em> &mdash; \u0447\u0442\u043e \u0432\u0435\u0440\u043d\u0435\u0442 \u0433\u0435\u0442\u0442\u0435\u0440?<\/p>\n<p>  <\/p>\n<p>\u041c\u044b&nbsp;\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438, \u0447\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b&nbsp;\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0433\u0435\u0442\u0442\u0435\u0440, <strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 this<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442, \u0438\u0437&nbsp;\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b&nbsp;\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0430&nbsp;\u043d\u0435&nbsp;\u043e\u0431\u044a\u0435\u043a\u0442, \u0432&nbsp;\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b&nbsp;\u0435\u0433\u043e \u043d\u0430\u0448\u043b\u0438. \u0412&nbsp;\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c this<\/strong> \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00ab\u043e2\u00bb<\/strong>, \u0430&nbsp;\u043d\u0435&nbsp;\u043e\u0431\u044a\u0435\u043a\u0442 <strong>\u00ab\u043e1\u00bb<\/strong>. \u0412&nbsp;\u044d\u0442\u043e\u043c \u043c\u044b&nbsp;\u043c\u043e\u0436\u0435\u043c \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u0441\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0432, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0433\u0435\u0442\u0442\u0435\u0440: <em>o2.x<\/em> \u0438\u043b\u0438 <em>o1.x<\/em>. \u0412&nbsp;\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043d&nbsp;\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <em>o2.x<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430, \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u041c\u044b&nbsp;\u0441\u043c\u043e\u0433\u043b\u0438 \u0441\u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u0443\u0441\u043e\u0447\u043a\u0430 \u043a\u043e\u0434\u0430 \u043d\u0430&nbsp;\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b&nbsp;\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0432&nbsp;\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"svoystvanbspmdash-akcessorynbspmdash-pochemu-oni-vyzyvayut-get\">\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430&nbsp;&mdash; \u0430\u043a\u0446\u0435\u0441\u0441\u043e\u0440\u044b&nbsp;&mdash; \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 [[Get]]?<\/h3>\n<p>  <\/p>\n<p>\u0413\u0434\u0435 \u0432&nbsp;\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>[[Get]]<\/em> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a&nbsp;\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <em>o2.foo<\/em>? \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0433\u0434\u0435-\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e. \u041d\u0435&nbsp;\u0432\u0435\u0440\u044c\u0442\u0435 \u043c\u043d\u0435 \u043d\u0430&nbsp;\u0441\u043b\u043e\u0432\u043e!<\/p>\n<p>  <\/p>\n<p>\u041c\u044b&nbsp;\u043d\u0430\u0448\u043b\u0438, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>[[Get]]<\/em> \u0432\u044b\u0437\u0432\u0430\u043b\u0441\u044f \u0438\u0437&nbsp;\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <em>GetValue<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441&nbsp;References. \u041d\u043e&nbsp;\u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>GetValue<\/em>?<\/p>\n<p>  <\/p>\n<h3 id=\"semantika-vonbspvremya-vypolneniya-dlya-memberexpression\">\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u0432\u043e&nbsp;\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f MemberExpression<\/h3>\n<p>  <\/p>\n<p>\u0413\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u044f\u0437\u044b\u043a\u0430. <a href=\"https:\/\/tc39.es\/ecma262\/#sec-runtime-semantics\">\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u0432\u043e&nbsp;\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/a> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0438&nbsp;\u0442\u043e, \u043a\u0430\u043a \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b&nbsp;\u0434\u043e&nbsp;\u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435&nbsp;\u0437\u043d\u0430\u043a\u043e\u043c\u044b&nbsp;\u0441 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%BE%D0%BD%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BD%D0%BE-%D1%81%D0%B2%D0%BE%D0%B1%D0%BE%D0%B4%D0%BD%D0%B0%D1%8F_%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B0\">\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e-\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u043e\u0439<\/a>, \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441&nbsp;\u043d\u0435\u0435 \u0441\u0435\u0439\u0447\u0430\u0441.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b&nbsp;\u0431\u0443\u0434\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432&nbsp;\u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435, \u0430&nbsp;\u043f\u043e\u043a\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443. \u0412&nbsp;\u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u044b&nbsp;\u043c\u043e\u0436\u0435\u043c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b (Yield, Await \u0438&nbsp;\u0442.\u0434.) \u0432&nbsp;\u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u044f\u0445 \u0432&nbsp;\u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 <em>MemberExpression<\/em> :<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">MemberExpression :      PrimaryExpression      MemberExpression [ Expression ]      MemberExpression . IdentifierName      MemberExpression TemplateLiteral      SuperProperty      MetaProperty      new MemberExpression Arguments<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b 7&nbsp;\u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f <em>MemberExpression<\/em>.<\/p>\n<p>  <\/p>\n<p><em>MemberExpression<\/em> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e <em>PrimaryExpression<\/em>. \u0422\u0430\u043a\u0436\u0435 <em>MemberExpression<\/em> \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437&nbsp;\u0434\u0440\u0443\u0433\u043e\u0433\u043e <em>MemberExpression<\/em> \u0438 <em>Expression<\/em>, \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0432\u043c\u0435\u0441\u0442\u0435: <em>MemberExpression[Expression]<\/em>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <em>o2[\u2019foo\u2019]<\/em>. \u0418\u043b\u0438 \u043e\u043d&nbsp;\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <em>MemberExpression.IdentifierName<\/em>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <em>o2.foo<\/em> &mdash; \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u0432\u043e&nbsp;\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u0438 <a href=\"https:\/\/tc39.es\/ecma262\/#sec-property-accessors-runtime-semantics-evaluation\">Runtime Semantics: Evaluation for MemberExpression: MemberExpression. IdentifierName<\/a> \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">1.  Let baseReference be the result of evaluating MemberExpression. 2.  Let baseValue be ? GetValue(baseReference). 3.  If the code matched by this MemberExpression is strict mode code, let strict be true; else let strict be false. 4.  Return ? EvaluatePropertyAccessWithIdentifierKey(baseValue, IdentifierName, strict).<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a&nbsp;\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <em>EvaluatePropertyAccessWithIdentifierKey<\/em>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u0442\u0430\u043a&nbsp;\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0435\u0435&nbsp;\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c. \u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f <a href=\"https:\/\/tc39.es\/ecma262\/#sec-evaluate-property-access-with-identifier-key\">EvaluatePropertyAccessWithIdentifierKey(baseValue, identifierName, strict)<\/a> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432&nbsp;\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>baseValue<\/strong>, <strong>identifierName<\/strong>, \u0430&nbsp;\u0442\u0430\u043a\u0436\u0435 strict \u0438&nbsp;\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">1.  Assert: identifierName is an IdentifierName 2.  Let bv be ? RequireObjectCoercible(baseValue). 3.  Let propertyNameString be StringValue of identifierName. 4.  Return a value of type Reference whose base value component is bv, whose referenced name component is propertyNameString, and whose strict reference flag is strict.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <em>EvaluatePropertyAccessWithIdentifierKey<\/em> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 Reference, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <strong>baseValue<\/strong> \u0432&nbsp;\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 base, \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>identifierName<\/strong> \u043a\u0430\u043a \u0438\u043c\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0438&nbsp;strict \u043a\u0430\u043a \u0444\u043b\u0430\u0433 \u0441\u0442\u0440\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412&nbsp;\u0438\u0442\u043e\u0433\u0435, Reference \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 <em>GetValue<\/em>. \u042d\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432&nbsp;\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0432&nbsp;\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0432&nbsp;\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442&nbsp;\u0442\u043e\u0433\u043e, \u043a\u0430\u043a Reference \u0432&nbsp;\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d.<\/p>\n<p>  <\/p>\n<h3 id=\"memberexpression-kak-parametr\">MemberExpression \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/h3>\n<p>  <\/p>\n<p>\u0412&nbsp;\u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">console.log(o2.foo);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412&nbsp;\u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u044f <em>ArgumentList: AssignmentExpression<\/em>. \u0414\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0435&nbsp;\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432&nbsp;\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u0438. \u0412&nbsp;\u043d\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>GetValue<\/em> \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/tc39.es\/ecma262\/#sec-argument-lists-runtime-semantics-argumentlistevaluation\">Runtime Semantics: ArgumentListEvaluation<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">1.  Let ref be the result of evaluating AssignmentExpression. 2.  Let arg be ? GetValue(ref). 3.  Return a List whose sole item is arg.<\/code><\/pre>\n<p>  <\/p>\n<p><em>o2.foo<\/em> \u043d\u0435&nbsp;\u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a <em>AssignmentExpression<\/em>, \u043d\u043e&nbsp;\u044d\u0442\u043e \u0442\u0430\u043a \u0438&nbsp;\u0435\u0441\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u044d\u0442\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u044e. \u0423\u0437\u043d\u0430\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0432\u044b&nbsp;\u043c\u043e\u0436\u0435\u0442\u0435, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u044d\u0442\u0443 <a href=\"https:\/\/v8.dev\/blog\/extras\/understanding-ecmascript-part-2-extra\">\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u043d\u043e&nbsp;\u0432&nbsp;\u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043e\u0441\u0442\u0440\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0435\u0439\u0447\u0430\u0441.<\/p>\n<p>  <\/p>\n<p>\u0412&nbsp;\u0448\u0430\u0433\u0435 1&nbsp;\u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 <em>AssignmentExpression<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>o2.foo<\/em>. \u0412&nbsp;ref \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412&nbsp;\u0448\u0430\u0433\u0435 2&nbsp;\u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <em>GetValue<\/em> \u043e\u0442&nbsp;\u043d\u0435\u0433\u043e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b&nbsp;\u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>[[Get]]<\/em> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d, \u0438&nbsp;\u043e\u0431\u0445\u043e\u0434 \u043f\u043e&nbsp;\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442.<\/p>\n<p>  <\/p>\n<h3 id=\"rezyume\">\u0420\u0435\u0437\u044e\u043c\u0435<\/h3>\n<p>  <\/p>\n<p>\u0412&nbsp;\u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b&nbsp;\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438, \u043a\u0430\u043a \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430; \u0432&nbsp;\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435-\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043b\u043e\u0438: \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438&nbsp;\u0448\u0430\u0433\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435&nbsp;\u0438\u0445.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/521768\/\"> https:\/\/habr.com\/ru\/post\/521768\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/521768\/\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/users\/xfides\/\" class=\"user_link\">xfides<\/a> <\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/v8.dev\/blog\/understanding-ecmascript-part-2\">\u0410\u0432\u0442\u043e\u0440 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430: Marja H\u00f6ltt\u00e4<\/a><br \/>  <a href=\"https:\/\/habr.com\/ru\/post\/490084\/\">\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/a><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zw\/5v\/0n\/zw5v0nunquuboemygpmoryc3czg.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u043f\u043e\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u0435\u043c\u0441\u044f \u0432&nbsp;\u0447\u0442\u0435\u043d\u0438\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0432\u044b&nbsp;\u043d\u0435&nbsp;\u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0435\u0435&nbsp;\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c. \u0412&nbsp;\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b&nbsp;\u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441&nbsp;\u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <em>Object.prototype.hasOwnProperty<\/em>. \u0422\u0430\u043a\u0436\u0435, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a <strong>\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0415\u0449\u0435 \u043c\u044b&nbsp;\u0443\u0437\u043d\u0430\u043b\u0438 \u043e&nbsp;<strong>\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f\u0445 \u00ab?\u00bb<\/strong> \u0438 <strong>\u00ab!\u00bb<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441&nbsp;\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043e\u043a. \u0418&nbsp;\u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b&nbsp;\u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e&nbsp;<strong>\u0442\u0438\u043f\u0430\u0445 \u044f\u0437\u044b\u043a\u0430, \u0442\u0438\u043f\u0430\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0441\u043b\u043e\u0442\u0430\u0445 \u0438&nbsp;\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445.<\/strong><\/p>\n<p>  <\/p>\n<h1 id=\"gotovy-dlya-vtoroy-chasti\">\u0413\u043e\u0442\u043e\u0432\u044b \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438?<\/h1>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-310878","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=310878"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310878\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}