{"id":175371,"date":"2013-04-04T21:50:03","date_gmt":"2013-04-04T17:50:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=175371"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=175371","title":{"rendered":"<span class=\"post_title\">\u041e\u0431\u0437\u043e\u0440 ECMAScript 6, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 JavaScript<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043b\u0438\u043a\u0431\u0435\u0437 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043a\u0442\u043e\u0432:  <\/p>\n<ul>\n<li>ECMAScript \u2014 \u044d\u0442\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u044f\u0437\u044b\u043a\u0430 JavaScript (\u0421\u043b\u043e\u0432\u043e JavaScript \u043d\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u043e Java \u044f\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u043c\u0430\u0440\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Sun) \u0422.\u0435. JavaScript \u2014 \u044d\u0442\u043e \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ECMAScript.<\/li>\n<li>TC39 \u2014 \u043a\u043e\u043c\u0438\u0442\u0435\u0442, \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 ECMAScript \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0444\u0438\u0447 \u0432 \u043d\u0435\u0433\u043e.<\/li>\n<li>ECMAScript \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e. \u0421\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u2014 ECMA-262.<\/li>\n<li>ECMAScript 5 \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ECMA-262 (\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d \u0432 2009 \u0433\u043e\u0434\u0443).<\/li>\n<li>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ECMA-262 \u0431\u044b\u043b\u0438:<br \/> \n<ul>\n<li>ECMAScript 3 \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 (\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d \u0432 1999 \u0433\u043e\u0434\u0443).<\/li>\n<li>ECMAScript 4 \u2014 \u043d\u0435 \u043f\u0440\u0438\u043d\u044f\u0442 \u0432 \u0432\u0438\u0434\u0443 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435. \u041f\u043e\u0437\u0434\u043d\u0435\u0435 \u0432 \u0438\u044e\u043b\u0435 2008 \u0433\u043e\u0434\u0443 \u0432 \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 (\u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u0433\u0430\u0447\u0435, \u0447\u0435\u043c ECMAScript 3) \u0432\u044b\u043b\u0438\u043b\u0441\u044f \u0432 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ECMAScript Harmony.<\/li>\n<\/ul>\n<p>  <\/li>\n<li>ECMAScript 6 (\u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u0438\u043c\u044f ECMAScript.next) \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c\u0441\u044f <b>\u0434\u043e \u043a\u043e\u043d\u0446\u0430 2013 \u0433\u043e\u0434\u0430<\/b>.<\/li>\n<\/ul>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0436\u0435 \u043d\u0430\u0441 \u0436\u0434\u0435\u0442 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 JavaScript?<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0411\u043b\u043e\u0447\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 (block scope)<\/h4>\n<p>  \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 JavaScript \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <code>var<\/code>, \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u043d\u044b \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430):<\/p>\n<pre><code>function f(a) {    if (a &lt; 0) {       var i = 3;    }    console.log(i); \/\/ 3 }  f(-1) <\/code><\/pre>\n<p>  \u0412 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>let<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441 \u0431\u043b\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code>function f(a) {    if (a &lt; 0) {       let i = 3;    }     console.log(i); \/\/ ReferenceError: i is not defined }  f(-1) <\/code><\/pre>\n<h4>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h4>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<pre><code>function setLevel(newLevel = 0) {    ... }  setLevel(); \/\/ newLevel = 0 setLevel(5); \/\/ newLevel = 5 setLevel(undefined); \/\/ newLevel = 0 <\/code><\/pre>\n<h4>\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h4>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<pre><code>function foo({ from, to = 10 }) {    ... }  foo({ from: 1, to: 5 }); foo({ to: 5, from: 1 }); foo({ from: 1 }); <\/code><\/pre>\n<p>  \u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c (\u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438):<\/p>\n<pre><code>function foo(positional, { named1, named2 }) {    ... }  foo(123, { named1: 'abc', named2: 'def' }) foo(123, { named2: 'def', named1: 'abc' }) <\/code><\/pre>\n<h4>Destructuring assignment<\/h4>\n<p>  ECMAScript 6 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0438:<\/p>\n<pre><code>let { first: f, last: l } = { first: 'Jane', last: 'Doe' }; console.log(f); \/\/ 'Jane' console.log(l); \/\/ 'Doe' <\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 (\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b) \u0432\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0414\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f refutable (\u043d\u0435 \u0438\u043c\u0435\u044e \u043f\u043e\u043d\u044f\u0442\u0438\u044f, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c). \u0422.\u0435. \u0435\u0441\u043b\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044f \u043d\u0435\u0442\u0443, \u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<pre><code>let { first: f, last: l } = { first: 'Jane' };  \/\/ \u043e\u0448\u0438\u0431\u043a\u0430 <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c, \u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043a\u0430\u043a irrefutable \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430 ?:<\/p>\n<pre><code>let { first: f, last?: l } = { first: 'Jane' };  \/\/ ok console.log(l);  \/\/ undefined <\/code><\/pre>\n<p>  \u041b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<pre><code>let { first: f, last: l = 'Unknown' } = { first: 'Jane' };  \/\/ ok console.log(l);  \/\/ 'Unknown' <\/code><\/pre>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0442\u0430\u043a\u0436\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u043b\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>undefined<\/code>:<\/p>\n<pre><code>let { a: x = 1 } = { a: undefined } console.log(x);  \/\/ 1 <\/code><\/pre>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 irrefutable, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0443\u0444\u0444\u0438\u043a\u0441&nbsp;? \u0432 \u043a\u043e\u043d\u0446\u0435 \u0432\u0441\u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>let { foo: f }? = anything;  \/\/ \u0432\u0441\u0435\u0433\u0434\u0430 ok <\/code><\/pre>\n<p>  \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>f<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>undefined<\/code>, \u0435\u0441\u043b\u0438 <code>anything<\/code> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e <code>undefined<\/code>, <code>null<\/code> \u0438\u043b\u0438 \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u044f <code>foo<\/code>.<\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u043a\u043e\u0434\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 <code>tmp<\/code>):<\/p>\n<pre><code>{ foo: foo, bar: bar } = { foo: bar, bar: foo}; <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u0438\u0449\u0435 \u043a\u043e\u0440\u043e\u0447\u0435:<\/p>\n<pre><code>[ foo, bar ] = [ bar, foo ]; <\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441\u044b<\/h4>\n<p>  \u0412 ECMAScript 6 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u044b:<\/p>\n<pre><code>\/\/ Supertype class Person {    constructor(name) {       this.name = name;    }     describe() {       return &quot;Person called &quot; + this.name;    } }  \/\/ Subtype class Employee extends Person {    constructor(name, title) {       super.constructor(name);       this.title = title;    }     describe() {       return super.describe() + &quot; (&quot; + this.title + &quot;)&quot;;    } } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b:<\/p>\n<pre><code>let jane = new Employee(&quot;Jane&quot;, &quot;CTO&quot;); jane instanceof Person; \/\/ true jane instanceof Employee; \/\/ true jane.describe(); \/\/ 'Person called Jane (CTO)' <\/code><\/pre>\n<p>  \u0412\u0441\u0435\u0433\u043e \u0442\u043e\u0433\u043e \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432:<\/p>\n<pre><code>\/\/ Supertype function Person(name) {    this.name = name; }  Person.prototype.describe = function () {    return &quot;Person called &quot; + this.name; };  \/\/ Subtype function Employee(name, title) {    Person.call(this, name);    this.title = title; }  Employee.prototype = Object.create(Person.prototype); Employee.prototype.constructor = Employee; Employee.prototype.describe = function () {    return Person.prototype.describe.call(this) + &quot; (&quot; + this.title + &quot;)&quot;; }; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u043b\u0430\u0441\u0441\u044b \u0432 ECMAScript 6 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u043d\u0430\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<pre><code>class Point {    constructor(x, y) {       this.x = x;       this.y = y;    }        static zero() {       return new Point(0, 0);    } } <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 (\u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u0432 ECMAScript 6). \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0435 \u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f. \u0427\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0443\u043b\u0438.<\/p>\n<h4>\u041c\u043e\u0434\u0443\u043b\u0438<\/h4>\n<p>  \u0412 JavaScript \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<pre><code>module Math {    export function sum(x, y) {       return x + y;    }     export var pi = 3.141593;     \/\/ \u041d\u0435 \u0432\u0438\u0434\u043d\u0430 \u0441\u043d\u0430\u0440\u0443\u0436\u0438    function internal() {       ...    } } <\/code><\/pre>\n<p>  \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<pre><code>import Math.{sum, pi};  alert(&quot;2\u03c0 = &quot; + sum(pi, pi)); <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>*<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451:<\/p>\n<pre><code>import Math.*;  alert(&quot;2\u03c0 = &quot; + sum(pi, pi)); <\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0432 \u0434\u0440\u0443\u0433\u0430:<\/p>\n<pre><code>module Widgets {    module Button { ... }    module Alert { ... }    module TextArea { ... }    ... }  import Widgets.Alert.{messageBox, confirmDialog}; ... <\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0437 \u0432\u0435\u0431\u0430 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<pre><code>module JSON = require('http:\/\/json.org\/modules\/json2.js'); \/\/ web import JSON.*;  module File = require('io\/File'); \/\/ file system  import require(&quot;bar.js&quot;).y; \/\/ file system <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043c\u043e\u0434\u0443\u043b\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438.<\/p>\n<h4>\u0426\u0438\u043a\u043b <code>for-of<\/code><\/h4>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0446\u0438\u043a\u043b <code>for-in<\/code> \u0432 JavaScript \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044f\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0445). \u0422.\u0435. \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u043e\u043f\u0430\u0441\u043d\u043e:<\/p>\n<pre><code>let arr = [ &quot;blue&quot;, &quot;green&quot; ]; arr.notAnIndex = 123; Array.prototype.protoProp = 456;  for(var x in arr) {    console.log(x); \/\/ \u041d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 blue, green, notAnIndex, protoProp } <\/code><\/pre>\n<p>  \u0412 ECMAScript 6 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0446\u0438\u043a\u043b <code>for-of<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0448\u0438\u0442 \u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443:<\/p>\n<pre><code>for(var x of arr) {    console.log(x); \/\/ \u041d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e blue, green } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 \u044f\u0437\u044b\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>yield<\/code>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b.<\/p>\n<h4>Arrow-\u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h4>\n<p>  \u0412 ECMAScript 6 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f arrow functions:<\/p>\n<pre><code>let squares = [ 1, 2, 3 ].map(x =&gt; x * x); <\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u0432\u044b\u0448\u0435 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d \u044d\u0442\u043e\u043c\u0443:<\/p>\n<pre><code>let squares = [ 1, 2, 3 ].map(function (x) { return x * x }); <\/code><\/pre>\n<p>  Arrow-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 arrow-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 <code>this<\/code> \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0432\u044b\u0448\u0435\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443. \u0422.\u0435.<\/p>\n<pre><code>let jane = {    name: &quot;Jane&quot;,             sayHello: function (friends) {       friends.forEach(friend =&gt; { console.log(this.name + &quot; says hello to &quot; + friend) });    } }  jane.sayHello([ 'Mark', 'John' ]); <\/code><\/pre>\n<p>  \u0432\u044b\u0432\u0435\u0434\u0435\u0442  <\/p>\n<pre><code>Jane says hello to Mark Jane says hello to John <\/code><\/pre>\n<p>  \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c. \u0410<\/p>\n<pre><code>let jane = {    name: &quot;Jane&quot;,             sayHello: function (friends) {       friends.forEach(function(friend) { console.log(this.name + &quot; says hello to &quot; + friend) });    } } <\/code><\/pre>\n<p>  \u0432\u044b\u0432\u0435\u0434\u0435\u0442:  <\/p>\n<pre><code> says hello to Mark  says hello to John <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>this<\/code> \u0438\u0437 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>function(friend) { ... })<\/code> \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0435\u0442 <code>this<\/code> \u0438\u0437 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u043f\u0440\u0438\u0435\u043c \u0441 <code>var self = this<\/code> \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>bind<\/code>:<\/p>\n<pre><code>var jane = {    name: &quot;Jane&quot;,             sayHello: function (friends) {       friends.forEach(function (friend) {          console.log(this.name + &quot; says hello to &quot; + friend)        }.bind(this));    } } <\/code><\/pre>\n<p>  \u0422.\u0435. \u043f\u043e \u0441\u0443\u0442\u0438 \u0441\u0432\u043e\u0435\u0439 arrow functions \u2014 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u043d\u0430\u0434 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code>(x, y) =&gt; x + y + this.z <\/code><\/pre>\n<p>  \u0435\u0441\u0442\u044c \u043d\u0438\u0447\u0442\u043e \u0438\u043d\u043e\u0435 \u043a\u0430\u043a:<\/p>\n<pre><code>function (x, y) { return x + y + this.z }.bind(this) <\/code><\/pre>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f arrow-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:  <\/p>\n<ul>\n<li>\u041d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c arrow-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u0430\u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b (<code>new (() =&gt; {}<\/code> \u043a\u0438\u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443)<\/li>\n<li>Arrow-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>arguments<\/code> (\u0434\u0430 \u0438 \u043d\u0435\u0437\u0430\u0447\u0435\u043c)<\/li>\n<\/ul>\n<p>  \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c arrow-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041e\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>typeof<\/code> \u0438 <code>instanceof<\/code>:<\/p>\n<pre><code>typeof () =&gt; {}; \/\/ 'function' () =&gt; {} instanceof Function; \/\/ true <\/code><\/pre>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u042f \u043e\u043f\u0438\u0441\u0430\u043b \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 ECMAScript 6. \u0418 \u043e\u0447\u0435\u043d\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0438\u0437 \u0442\u043e\u0433\u043e, \u043e \u0447\u0435\u043c \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435, \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0432\u0441\u0435, \u0447\u0442\u043e \u044f \u043e\u043f\u0438\u0441\u0430\u043b, \u2014 \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u0443\u0445\u0438. \u042d\u0442\u043e \u0432\u0435\u0449\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u043e\u043c TC39. \u0418 \u043a \u043a\u043e\u043d\u0446\u0443 \u044d\u0442\u043e\u0433\u043e (2013) \u0433\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d.<\/p>\n<h4>\u0421\u0441\u044b\u043b\u043a\u0438<\/h4>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 <a href=\"http:\/\/www.2ality.com\/\">\u0431\u043b\u043e\u0433\u0430<\/a> \u0434\u043e\u043a\u0442\u043e\u0440\u0430 <a href=\"http:\/\/rauschma.de\">Axel&#8217;\u0430 Rauschmayer&#8217;a<\/a>, \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u043f\u043e\u0432\u0438\u0434\u0430\u0442\u044c \u0432\u0436\u0438\u0432\u0443\u044e \u043c\u043d\u0435 \u043f\u043e\u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 CodeFest \u0432 \u041d\u043e\u0432\u043e\u0441\u0438\u0431\u0438\u0440\u0441\u043a\u0435.<\/p>\n<p>  PS. \u0421\u043f\u0430\u0441\u0438\u0431\u043e 2GIS \u0437\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438!    \t \t\t   \t<\/p>\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\/175371\/\"> http:\/\/habrahabr.ru\/post\/175371\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043b\u0438\u043a\u0431\u0435\u0437 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043a\u0442\u043e\u0432:  <\/p>\n<ul>\n<li>ECMAScript \u2014 \u044d\u0442\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u044f\u0437\u044b\u043a\u0430 JavaScript (\u0421\u043b\u043e\u0432\u043e JavaScript \u043d\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u043e Java \u044f\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u043c\u0430\u0440\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Sun) \u0422.\u0435. JavaScript \u2014 \u044d\u0442\u043e \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ECMAScript.<\/li>\n<li>TC39 \u2014 \u043a\u043e\u043c\u0438\u0442\u0435\u0442, \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 ECMAScript \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0444\u0438\u0447 \u0432 \u043d\u0435\u0433\u043e.<\/li>\n<li>ECMAScript \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e. \u0421\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u2014 ECMA-262.<\/li>\n<li>ECMAScript 5 \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ECMA-262 (\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d \u0432 2009 \u0433\u043e\u0434\u0443).<\/li>\n<li>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ECMA-262 \u0431\u044b\u043b\u0438:<br \/> \n<ul>\n<li>ECMAScript 3 \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 (\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d \u0432 1999 \u0433\u043e\u0434\u0443).<\/li>\n<li>ECMAScript 4 \u2014 \u043d\u0435 \u043f\u0440\u0438\u043d\u044f\u0442 \u0432 \u0432\u0438\u0434\u0443 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435. \u041f\u043e\u0437\u0434\u043d\u0435\u0435 \u0432 \u0438\u044e\u043b\u0435 2008 \u0433\u043e\u0434\u0443 \u0432 \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 (\u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u0433\u0430\u0447\u0435, \u0447\u0435\u043c ECMAScript 3) \u0432\u044b\u043b\u0438\u043b\u0441\u044f \u0432 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ECMAScript Harmony.<\/li>\n<\/ul>\n<p>  <\/li>\n<li>ECMAScript 6 (\u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u0438\u043c\u044f ECMAScript.next) \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c\u0441\u044f <b>\u0434\u043e \u043a\u043e\u043d\u0446\u0430 2013 \u0433\u043e\u0434\u0430<\/b>.<\/li>\n<\/ul>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0436\u0435 \u043d\u0430\u0441 \u0436\u0434\u0435\u0442 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 JavaScript?<\/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-175371","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175371","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=175371"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175371\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=175371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=175371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=175371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}