{"id":202686,"date":"2013-11-19T10:04:03","date_gmt":"2013-11-19T06:04:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=202686"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=202686","title":{"rendered":"<span class=\"post_title\">20 \u0438 1 \u043f\u0440\u0438\u043c\u043e\u0447\u043a\u0430 Javascript, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0433\u0443 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       <nobr><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/83a\/ffe\/362\/83affe362c8578457f4566853d1928dc.jpg\" align=\"right\"\/><\/nobr>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Javascript ES3, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u041e\u0434\u043d\u0438 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0442\u0440\u0443\u0434\u043d\u043e\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c\u044b. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0435 \u0438\u0437 \u043d\u0438\u0445, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 (\u043a\u0430\u043a \u043f\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u043c \u043c\u0435\u0436\u0434\u0443 apply \u0438 call), \u0430 \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0430\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445. <\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c, \u0445\u043e\u0447\u0443 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c 3 \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043d\u0435 \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0451\u0439: <\/p>\n<p>  1. \u042f \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e, \u0447\u0442\u043e \u044d\u0442\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0442\u0430\u043a\u0438\u0435 \u043f\u043e \u0441\u0443\u0442\u0438. \u042f \u0438\u0445 \u043d\u0430\u0445\u043e\u0436\u0443 \u0442\u0440\u0443\u0434\u043d\u044b\u043c\u0438 \u043b\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0442\u0430\u043b\u0438, \u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435 \u043e\u0441\u0432\u0435\u0436\u0430\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438). \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u043c\u0438 \u0434\u043b\u044f \u0432\u0430\u0441. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  2. \u042f \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430, \u0430 \u043b\u0438\u0448\u044c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0445, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0445 \u0432 \u043a\u043e\u0434\u0435 \u2014 \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  3. \u042f \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 ES5 \u2014 \u043d\u0438 Strict, \u043d\u0438 \u0432\u043e\u043e\u0431\u0449\u0435, \u043d\u0438 ES6 \u0432 \u0446\u0435\u043b\u043e\u043c. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043d\u0438\u0445 \u043f\u043e\u0437\u0436\u0435. \u042f \u043f\u0440\u0438\u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u043b\u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 ECMAScript.<\/p>\n<p>  C \u0443\u0447\u0451\u0442\u043e\u043c \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e, \u043d\u0430\u0447\u043d\u0451\u043c.<\/p>\n<h3>1. \u22120 = +0 = 0 (\u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u043d\u0443\u043b\u044c \u0440\u0430\u0432\u0435\u043d \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u043d\u0443\u043b\u044f\u043c)<\/h3>\n<p>  \u0412 JavaScript \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 -0 \u0438 +0, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435, \u0441 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0432\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u043d\u0443\u043b\u044e. \u041d\u043e \u043e\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043a \u0441\u0442\u0440\u043e\u0433\u043e\u043c\u0443 \u043d\u0443\u043b\u044e \u043f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/6phD9\/light\/\">jsfiddle.net\/codylindley\/6phD9\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">console.log(-0); \/\/logs 0 console.log(+0); \/\/logs 0 console.log(-0 === +0); \/\/logs true console.log(0 === -0); \/\/logs true console.log(0 === +0); \/\/logs true <\/code><\/pre>\n<h3>2. \u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0431\u0435\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 new<\/h3>\n<p>  \u0417\u0430\u0431\u044b\u043b\u0438 \u0438\u043b\u0438 \u043d\u0430\u0434\u043e\u0435\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c new \u2014 \u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0442\u0430\u043a (\u043d\u043e \u043d\u0435 \u0442\u0430\u043a). \u041d\u0430\u0434\u043e\u0435\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u043e\u0431\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u2014 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/nHCvx\/light\/\">jsfiddle.net\/codylindley\/nHCvx\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">var Human = function(){     this.type = 'human';     console.log('I was called'); }; new Human; \/\/\u0432\u044b\u0437\u043e\u0432 \u0431\u0435\u0437 \u0441\u043a\u043e\u0431\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 &quot;I was called&quot;  console.log((new Human).type); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 human <\/code><\/pre>\n<h3>3. instanceof \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430\u043c\u0438<\/h3>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 instanceof \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 false \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a, \u0447\u0438\u0441\u0435\u043b \u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 (\u0442.\u0435. \u0432 \u043e\u0431\u0451\u0440\u0442\u043a\u0430\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432), \u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e null \u0438 undefined \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043e\u0431\u0451\u0440\u0442\u043a\u0438.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/bpJjZ\/light\/\">jsfiddle.net\/codylindley\/bpJjZ\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">\/\/instanceof \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430\u0445 console.log(&quot;&quot; instanceof String); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 false console.log(3 instanceof Number); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 false console.log(false instanceof Boolean); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 false  \/\/instanceof \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 (\u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445) console.log(new String() instanceof String); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 true console.log(new Number() instanceof Number); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 true console.log(new Boolean() instanceof Boolean); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 true console.log([] instanceof Array); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 true console.log({} instanceof Object); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 true console.log(\/foo\/ instanceof RegExp); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442  true  \/\/\u043a \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044e, console.log([] instanceof Object); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 true<\/code><\/pre>\n<h3>4. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 typeof \u2014 \u043d\u0435\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438<\/h3>\n<p>  \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u044c typeof \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430\u043c\u0438, \u043d\u043e \u0438 \u0442\u0430\u043c \u0438\u043c\u0435\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443: (typeof null === \u00abobject\u00bb) == true, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e <a href=\"http:\/\/javascriptweblog.wordpress.com\/2011\/08\/08\/fixing-the-javascript-typeof-operator\/\">\u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u043e-\u043a\u043e\u0441\u0442\u044b\u043b\u044c\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b<\/a> \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c\u0438.\/<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/U64aZ\/light\/\">jsfiddle.net\/codylindley\/U64aZ\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">\/\/\u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 string, number, \u0438 boolean console.log(typeof &quot;&quot;); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 &quot;string&quot; console.log(typeof 4); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 number console.log(typeof true); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 boolean console.log(typeof undefined); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 undefined <\/code><\/pre>\n<p>  \/\/\u043d\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a null<br \/>  console.log(typeof null); \/\/\u0427\u0422\u041e?? \u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e! \u0432\u044b\u0432\u043e\u0434\u0438\u0442 Object<\/p>\n<h3>5. \u0411\u0443\u043b\u0435\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442 \u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u0441\u0435\u0433\u0434\u0430 true<\/h3>\n<p>  <\/p>\n<pre><code class=\"javascript\">console.log(!!(new Boolean(false)) )  \/\/true <\/code><\/pre>\n<p>  new Boolean(new Boolean(false)) \u2014 \u043d\u0435 false, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442-\u043e\u0431\u0451\u0440\u0442\u043a\u0443. \u0410 \u043e\u0431\u044a\u0435\u043a\u0442 (\u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u0440\u0443\u043a\u0430\u043c\u0438) \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043a true. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043e\u0444\u0438\u0437\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430. \u0410 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 false \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b (NaN, false, 0, null, undefined, \u0438 &#187;) \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439.<\/p>\n<h3>6. \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438?<\/h3>\n<p>  \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u042d\u0442\u0438 \u0441\u043b\u043e\u0432\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b, \u043d\u043e \u0437\u043d\u0430\u043d\u0438\u0435 \u0438\u0445 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/8Zkdd\/light\/\">jsfiddle.net\/codylindley\/8Zkdd\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">var myFunction = function(x,y,z){ \/\/x,y,z - \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b     return x+y+z }; myFunction(1,2,3); \/\/1,2,3 - \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b <\/code><\/pre>\n<h3>7. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430<\/h3>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u0442\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/c2xb4\/light\/\">jsfiddle.net\/codylindley\/c2xb4\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">var myFunction = function(parameter){     parameter = undefined; \/\/\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043d\u0430 undefiend     console.log(parameter); }; var myArray = [1,2,3]; myFunction(myArray); \/\/\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c myFunction, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u043c\u0430\u0441\u0441\u0438\u0432  \/\/myArray - \u043d\u0435 undefined , \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u043d \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u0437\u043c\u0435\u043d\u0451\u043d \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 console.log(myArray); \/\/logs [1,2,3] <\/code><\/pre>\n<h3>8. \u0412\u044b\u0437\u043e\u0432 Boolean() \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 boolean<\/h3>\n<p>  \u0412\u044b\u0437\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0431\u0435\u0437 new) \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0432 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435.<\/p>\n<p>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/4wQLd\/light\/\">jsfiddle.net\/codylindley\/4wQLd\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">\/\/\u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0438\u0436\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 false  console.log(Boolean(undefined)); console.log(Boolean(null)); console.log(Boolean(0)); console.log(Boolean('')); console.log(Boolean(NaN));  \/\/\u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0438\u0436\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true console.log(Boolean(1)); console.log(Boolean('false')); console.log(Boolean([])); console.log(Boolean({})); console.log(Boolean(function(){})); console.log(Boolean(\/foo\/)); <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u0432\u043e\u0439\u043d\u0430\u044f \u0438\u043d\u0432\u0435\u0440\u0441\u0438\u044f !!() \u0434\u0430\u0441\u0442 \u0442\u043e\u0442 \u0436\u0435 \u044d\u0444\u0444\u0435\u043a\u0442. \u041d\u043e \u044d\u0442\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/jNPvH\/light\/\">jsfiddle.net\/codylindley\/jNPvH\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">\/\/\u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0438\u0436\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 false  console.log(!!undefined); console.log(!!null); console.log(!!0); console.log(!!''); console.log(!!NaN);  \/\/\u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0438\u0436\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true console.log(!!1); console.log(!!'false'); console.log(!![]); console.log(!!{}); console.log(!!function(){}); console.log(!!\/foo\/); <\/code><\/pre>\n<h3>9. \u0412\u044b\u0437\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0431\u0435\u0437 new \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b<\/h3>\n<p>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/ymGmG\/light\/\">jsfiddle.net\/codylindley\/ymGmG\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">\/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 true console.log(String('foo') === 'foo'); console.log(Number(5) === 5); console.log(Boolean('true') === true);  \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 false, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 console.log(new String('foo') === 'foo'); console.log(new Number(5) === 5); console.log(new Boolean('true') === true); <\/code><\/pre>\n<h3>10. Object() \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432<\/h3>\n<p>  \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432, Object() \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/tGChw\/light\/\">jsfiddle.net\/codylindley\/tGChw\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">\/\/\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432 number \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 console.log(Object(1) instanceof Number); \/\/logs true  \/\/\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432 string \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 console.log(Object('foo') instanceof String);  \/\/\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432 boolean \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 console.log(Object(true) instanceof Boolean);<\/code><\/pre>\n<h3>11. \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 \u0442\u0430\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443<\/h3>\n<p>  \u0412\u0441\u0451 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b, \u043a\u0442\u043e \u0431\u044b \u0447\u0442\u043e \u0442\u0430\u043c \u043d\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043b. \u041f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442 \u0438 \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 undefined. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0430\u044f <a href=\"http:\/\/javascriptweblog.wordpress.com\/2010\/09\/27\/the-secret-life-of-javascript-primitives\/\">\u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f<\/a>.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/E7GGK\/light\/\">jsfiddle.net\/codylindley\/E7GGK\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">\/\/\u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b var N = 5; var S = 'foo'; var B = true;  \/\/\u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442, \u0435\u0441\u043b\u0438 \u0443 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 \u043d\u0435\u0442 \u043e\u0431\u0451\u0440\u0442\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 N.test = 'test'; S.test = 'test'; B.test = 'test';  \/\/\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c console.log(N.test); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 undefined console.log(S.test); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 undefined console.log(B.test); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 undefined <\/code><\/pre>\n<h3>12. delete \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430<\/h3>\n<p>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/xYsuS\/light\/\">jsfiddle.net\/codylindley\/xYsuS\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">var Person = function(){}; \/\/\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 Person  Person.prototype.type = 'person'; \/\/\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e  var cody = new Person(); \/\/\u043f\u043e\u0442\u043e\u043c\u043e\u043a Person  delete cody.type \/\/\u0443\u0434\u0430\u043b\u044f\u0435\u043c (?) type  console.log(cody.type) \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 person, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u044b\u043d \u0437\u0430 \u043e\u0442\u0446\u0430 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 <\/code><\/pre>\n<h3>13. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u0441\u0442\u0440\u043e\u043a \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u044b<\/h3>\n<p>  \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, (\u0442.\u0435. console.log(new String(&#8216;foo&#8217;)); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 foo {0=\u00abf\u00bb, 1=\u00abo\u00bb, 2=\u00abo\u00bb} ), \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043a\u0440\u043e\u043c\u0435 IE7-).<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/7p2ed\/light\/\">jsfiddle.net\/codylindley\/7p2ed\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">\/\/\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432 \u0441\u0442\u0440\u043e\u043a\u0438 var foo = 'foo';  \/\/\u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u043a\u0430\u043a \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443 console.log(foo[0]) \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 &quot;f&quot;, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 {0=&quot;f&quot;, 1=&quot;o&quot;, 2=&quot;o&quot;}  \/\/\u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0443\u0433\u043b\u043e\u0432\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 console.log(foo['length']); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 3 <\/code><\/pre>\n<h3>14. \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0438\u0437 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 \u0447\u0438\u0441\u0435\u043b<\/h3>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430 \u0447\u0438\u0441\u043b\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0451\u0442\u0441\u044f \u043a\u0430\u043a \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0438 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0443\u0435\u0442 \u0441 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u0441\u043c\u044b\u0441\u043b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443. \u041d\u043e \u0432\u0442\u043e\u0440\u0430\u044f\u2026<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/Pn6YT\/light\/\">jsfiddle.net\/codylindley\/Pn6YT\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">\/\/\u0441\u043a\u043e\u0431\u043e\u0447\u043d\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f console.log(2['toString']()); \/\/logs 2  \/\/\u0442\u043e\u0447\u0435\u0447\u043d\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438.  console.log(2..toString()); \/\/logs 2  \/\/\u0441\u043a\u043e\u0431\u043a\u0438 \u0434\u043b\u044f \u0442\u043e\u0447\u0435\u0447\u043d\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 console.log((2).toString()); \/\/logs 2 <\/code><\/pre>\n<h3>15. Array.length \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b<\/h3>\n<p>  \u042f\u0432\u043d\u044b\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 length \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u044f\u0434 undefined-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0435\u0446 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u043b\u0438 \u0443\u043a\u043e\u0440\u043e\u0442\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/9Pp9h\/light\/\">jsfiddle.net\/codylindley\/9Pp9h\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">var myArray1 = []; myArray1.length = 3; console.log(myArray1); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 [undefined, undefined, undefined]  \/\/\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 myArray2 = [1,2,3,4,5,6,7,8,9] myArray2.length = 1; console.log(myArray2); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 [1] <\/code><\/pre>\n<h3>16. \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &quot;||&quot; \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0435\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u044d\u0442\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442\u0441\u044f \u043a true, \u043f\u0440\u0430\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043c \u00abshort-circuiting\u00bb (\u0437\u0430\u043a\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435, \u0438\u043b\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u2014 \u00ab\u0438\u0434\u0442\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c\u00bb). \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 true \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0438\u0445 \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0435\u0442\u0442\u0435\u0440\u0430\u0445.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/NUKKZ\/light\/\">jsfiddle.net\/codylindley\/NUKKZ\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">\/\/\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u043a true, \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f var foo = false || 0 || '' || 4 || 'foo' || true;  console.log(foo); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 4, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \/\/    \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u043c\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 <\/code><\/pre>\n<h3>17. \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &quot;&#038;&#038;&quot; \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043d\u043e \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0444\u043e\u043b\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/DEbk5\/light\/\">jsfiddle.net\/codylindley\/DEbk5\/light\/<\/a><\/p>\n<pre><code class=\"javascript\">\/\/\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u043a false, \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f var foo = true && 'foo' && '' && 4 && 'foo' && true;  console.log(foo); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u0442 '', \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a false <\/code><\/pre>\n<h3>18. \u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c null, \u0430 \u043a\u043e\u0433\u0434\u0430 \u2014 undefined?<\/h3>\n<p>  \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, null \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432) \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 undefined \u2014 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430, \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430: \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430. \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c null \u0434\u043b\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u0438 \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0430 undefined \u2014 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043b\u044f Javascript \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0435\u0433\u043e \u00ab\u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e\u00bb. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 null \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u044b \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u0442 \u0441\u043b\u0435\u0434\u043e\u0432 \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a null.<\/p>\n<h3>19. undefined \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h3>\n<p>  undefined \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 undefined).<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/3buPG\/light\/\">jsfiddle.net\/codylindley\/3buPG\/light\/<\/a><br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/3buPG\/light\/\">jsfiddle.net\/codylindley\/3buPG\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">\/\/\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 - \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 var foo; console.log(foo); \/\/undefined  \/\/\u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 undefined console.log(this.foo); \/\/undefined  \/\/\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0436\u0438\u0434\u0430\u044e\u0449\u0435\u0439 \u0438\u0445, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a undefined-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c var myFunction = function f(x){return x} console.log(myFunction()); \/\/undefined  \/\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442 undefined, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430 \u044f\u0432\u043d\u044b\u0439 return \u0432\u043e\u043e\u0431\u0449\u0435 var myFunc = function f(){}; console.log(myFunc()); \/\/undefined <\/code><\/pre>\n<h3>20. \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0447\u0442\u043e \u044f\u0440\u043a\u043e \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 if \u0438 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u043c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u00abif\u00bb \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2014 \u043c\u043e\u0436\u0435\u0442.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/SSh68\/light\/\">jsfiddle.net\/codylindley\/SSh68\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">var verify = true;  \/\/\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 if \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043b\u044e\u0431\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 if(verify){console.log('verify is true');}  \/\/\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b  \/\/\u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e (\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 --\u043f\u0440\u0438\u043c.\u043f\u0435\u0440.) var check = verify ? console.log('verify is true') : console.log('verify is false');  \/\/\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e console.log(verify ? 'verify is true' : ' verify is false'); <\/code><\/pre>\n<h3>21. \u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 ++ \u0438 &#8212;<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 (\u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439), \u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0437\u0430\u0442\u0435\u043c \u043e\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u2014 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<br \/>  <a href=\"http:\/\/jsfiddle.net\/codylindley\/QzG9w\/light\/\">jsfiddle.net\/codylindley\/QzG9w\/light\/<\/a>  <\/p>\n<pre><code class=\"javascript\">http:\/\/jsfiddle.net\/codylindley\/QzG9w\/light\/ var boo = 1; var foo = 1;  console.log(boo++); \/\/\u0434\u0430\u0451\u0442 1, \u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 console.log(boo) \u0434\u0430\u043b \u0431\u044b 2 console.log(++foo); \/\/\u0434\u0430\u0451\u0442 2, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 foo <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/202686\/\"> http:\/\/habrahabr.ru\/post\/202686\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       <nobr><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/83a\/ffe\/362\/83affe362c8578457f4566853d1928dc.jpg\" align=\"right\"\/><\/nobr>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Javascript ES3, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u041e\u0434\u043d\u0438 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0442\u0440\u0443\u0434\u043d\u043e\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c\u044b. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0435 \u0438\u0437 \u043d\u0438\u0445, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 (\u043a\u0430\u043a \u043f\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u043c \u043c\u0435\u0436\u0434\u0443 apply \u0438 call), \u0430 \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0430\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430\u0445. <\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c, \u0445\u043e\u0447\u0443 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c 3 \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043d\u0435 \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0451\u0439: <\/p>\n<p>  1. \u042f \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e, \u0447\u0442\u043e \u044d\u0442\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0442\u0430\u043a\u0438\u0435 \u043f\u043e \u0441\u0443\u0442\u0438. \u042f \u0438\u0445 \u043d\u0430\u0445\u043e\u0436\u0443 \u0442\u0440\u0443\u0434\u043d\u044b\u043c\u0438 \u043b\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0442\u0430\u043b\u0438, \u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435 \u043e\u0441\u0432\u0435\u0436\u0430\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438). \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u043c\u0438 \u0434\u043b\u044f \u0432\u0430\u0441. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435.  <\/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-202686","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/202686","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=202686"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/202686\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=202686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=202686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=202686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}