{"id":276564,"date":"2016-03-21T09:27:02","date_gmt":"2016-03-21T06:27:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=276564"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=276564","title":{"rendered":"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 ECMA-262 (JavaScript) \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445, \u0447\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/-eWS_tWrLYDw\/VukDXYnAXgI\/AAAAAAAAAWU\/kqLdK1PHJH4uQdckngCUpaexiIWp-cweA\/s0\/ECMAScript.png\" title=\"ECMAScript\"\/><\/p>\n<p>  <a href=\"https:\/\/habrahabr.ru\/post\/279421\/\">\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <em>execution context<\/em>, <em>lexical environment<\/em> \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <em>Function<\/em>. \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e <em>this<\/em>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 this<\/h2>\n<p>  \u0412 <em>execution context<\/em> \u043a\u0440\u043e\u043c\u0435 <em>VariableEnvironment<\/em> \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 <em>ThisBinding<\/em>. \u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <em>VariableEnvironment<\/em>, <a href=\"http:\/\/www.ecma-international.org\/ecma-262\/5.1\/#sec-11.1.1\">\u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 <em>this<\/em> \u2013 <em>ThisBinding<\/em><\/a>. <em>ThisBinding<\/em> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <em>execution context<\/em> \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443 <em>o.f()<\/em>, \u0442\u043e <em>ThisBinding<\/em> \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 <em>o<\/em>. \u0412\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 <em>ThisBinding<\/em> \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <em>global object<\/em>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>print<\/em> \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 <em>o<\/em>, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a <code>print()<\/code>, \u0442\u0430\u043a \u0438 \u043a\u0430\u043a <code>o.print()<\/code>. <em>ThisBinding<\/em> \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u0415\u0441\u043b\u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <em>o.print<\/em> \u0432 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>print2<\/em>, \u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <em>print2<\/em> <em>ThisBinding<\/em> \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0430 \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/0cd\/555\/f53\/0cd555f53d024ce6ae254c473a84df08.png\"\/><\/p>\n<p>  \u0415\u0449\u0435 \u0440\u0430\u0437, \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 &quot;\u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443&quot;, \u0442\u043e <em>ThisBinding<\/em> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0434\u043e \u0442\u043e\u0447\u043a\u0438. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <em>ThisBinding<\/em> \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <em>global object<\/em>.<\/p>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f <em>this<\/em> \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.ecma-international.org\/ecma-262\/5.1\/#sec-10.4.3\">10.4.3 Entering Function Code<\/a><\/li>\n<li><a href=\"http:\/\/www.ecma-international.org\/ecma-262\/5.1\/#sec-11.2.3\">11.2.3 Function Calls<\/a><\/li>\n<li><a href=\"http:\/\/www.ecma-international.org\/ecma-262\/5.1\/#sec-13.2.1\">13.2.1 [[Call]]<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 setTimeout<\/h2>\n<p>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <em>callback\u2019\u043e\u0432<\/em> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u043e \u043d\u0435 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <em>callback\u2019\u0430<\/em> <em>this<\/em> \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 <em>global object<\/em>.<\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <em>setTimout<\/em> \u043f\u0435\u0440\u0432\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>func<\/em>. \u041f\u043e\u0441\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 <em>setTimeout<\/em> \u0435\u0451 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442. \u0412\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u0442\u043e\u0447\u043a\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a <code>func()<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <em>ThisBinding<\/em> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 <em>global object<\/em>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/dec\/b16\/ae8\/decb16ae8ab949a2bcc602bead96a87f.png\"\/><\/p>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u2013 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 <em>environment<\/em> \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0418\u043c\u0435\u044f \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <em><a href=\"http:\/\/www.ecma-international.org\/ecma-262\/5.1\/#sec-15.3.4.4\">Function.prototype.call<\/a><\/em>. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>call<\/em> \u043c\u043e\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 <em>ThisBinding<\/em> \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. <\/p>\n<p>  \u0422\u0430\u043a \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>print.call(o)<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0432 <em>ThisBinding<\/em> \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <em>o<\/em>.<\/p>\n<p>  \u0422\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>bind<\/em> \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"javascript\">... \/\/ bind \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e f function bind(thisArg, f) {   return function wrapper() {     f.call(thisArg);   } }  \/\/ \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f bind \u043d\u0430\u0434\u043e \u0442\u0430\u043a setTimeout(bind(o, o.print), 1);<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>bind<\/em> \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f <em>environment<\/em> \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 <em>Function<\/em> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <em>wrapper<\/em>. \u0412 <em>thisArg<\/em> \u0438 <em>f<\/em> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>print<\/em>. \u0412 <em>scope<\/em> \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>Function<\/em> \u043a\u043b\u0430\u0434\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <em>environment<\/em>. \u041f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 <em>bind<\/em> \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0441\u044f, \u043d\u043e <em>environment<\/em> \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f <em>wrapper<\/em>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1c3\/dad\/5e8\/1c3dad5e8d864279b3c1aebd71a3154a.png\" alt=\"enter image description here\"\/><\/p>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <em>setTimeout<\/em> \u0447\u0435\u0440\u0435\u0437 <em>delay<\/em> \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u0432\u044b\u0437\u043e\u0432\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>wrapper<\/em>. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <em>environment<\/em> \u0432 \u043f\u043e\u043b\u0435 <em>outer<\/em> \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>scope<\/em> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <em>outer<\/em> \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <em>environment<\/em> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>bind<\/em>. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>f.call(thisArg)<\/code> \u0438\u0437 <em>wrapper<\/em> \u043e\u0431\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0432 \u044d\u0442\u043e\u043c <em>environment<\/em>. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <em>call<\/em> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f <em>print<\/em>, \u0433\u0434\u0435 <em>ThisBinding<\/em> \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 <em>o<\/em>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4d5\/16a\/25a\/4d516a25af1047a3bf5a8659951b6b00.png\" alt=\"enter image description here\"\/><\/p>\n<p>  \u0412 JavaScript \u0435\u0441\u0442\u044c <a href=\"http:\/\/www.ecma-international.org\/ecma-262\/5.1\/#sec-15.3.4.5\">\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <em>Function.prototype.bind<\/em><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e <em>this<\/em>, \u043d\u043e \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code class=\"javascript\">\/\/ \u0432\u043c\u0435\u0441\u0442\u043e setTimeout(bind(o, o.print), 1);  \/\/ \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 bind setTimeout(o.print.bind(o), 1);<\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438.                 <\/p>\n<div class=\"clear\"><\/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:\/\/habrahabr.ru\/post\/279733\/\"> https:\/\/habrahabr.ru\/post\/279733\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/-eWS_tWrLYDw\/VukDXYnAXgI\/AAAAAAAAAWU\/kqLdK1PHJH4uQdckngCUpaexiIWp-cweA\/s0\/ECMAScript.png\" title=\"ECMAScript\"\/><\/p>\n<p>  <a href=\"https:\/\/habrahabr.ru\/post\/279421\/\">\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <em>execution context<\/em>, <em>lexical environment<\/em> \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <em>Function<\/em>. \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e <em>this<\/em>.  <\/p>\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-276564","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276564","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=276564"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276564\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}