{"id":346763,"date":"2023-03-15T15:02:33","date_gmt":"2023-03-15T15:02:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346763"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346763","title":{"rendered":"<span>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 JavaScript \u0438 TypeScript \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043b\u0435\u0442. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ma\/po\/lv\/mapolvqq4uunxfqoaviv3g9km9y.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ma\/po\/lv\/mapolvqq4uunxfqoaviv3g9km9y.jpeg\" data-blurred=\"true\"\/>  <\/p>\n<p>  Hello, world!<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 <a href=\"https:\/\/betterprogramming.pub\/all-javascript-and-typescript-features-of-the-last-3-years-629c57e73e42\">\u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c JS \u0438 TS \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0442\u0440\u0435\u0445 \u043b\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 JS, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 TS.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><em>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/em>: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b MDN.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"ecmascript\">ECMAScript<\/h2>\n<p>  <\/p>\n<h3 id=\"do-es2020-vozmozhnosti-o-kotoryh-mnogie-ne-znayut\">\u0414\u043e ES2020 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442)<\/h3>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Template_literals#tagged_templates\">\u0422\u0435\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \/ Tagged template literals<\/a><\/strong>: \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0447\u0430\u0441\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 function formatNumbers(strings: TemplateStringsArray, number: number): string {   return strings[0] + number.toFixed(2) + strings[1]; } console.log(formatNumbers`This is the value: ${0}, it's important.`); \/\/ This is the value: 0.00, it's important.  \/\/ \u0418\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \"\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c\" (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440) \u043a\u043b\u044e\u0447\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 function translateKey(key: string): string {   return key.toLocaleLowerCase(); } function translate(strings: TemplateStringsArray, ...expressions: string[]): string {   return strings.reduce((accumulator, currentValue, index) => accumulator + currentValue + translateKey(expressions[index] ?? ''), ''); } console.log(translate`Hello, this is ${'NAME'} to say ${'MESSAGE'}.`); \/\/ Hello, this is name to say message.<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Symbol\">\u0421\u0438\u043c\u0432\u043e\u043b\u044b \/ Symbols<\/a>__: \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (<code>Symbol(\"foo\") === Symbol(\"foo\"); \/\/ false<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const obj: { [index: string]: string } = {};  const symbolA = Symbol('a'); const symbolB = Symbol.for('b');  console.log(symbolA.description); \/\/ \"a\"  obj[symbolA] = 'a'; obj[symbolB] = 'b'; obj['c'] = 'c'; obj.d = 'd';  console.log(obj[symbolA]); \/\/ \"a\" console.log(obj[symbolB]); \/\/ \"b\" \/\/ \u041a\u043b\u044e\u0447 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u043b\u0438 \u0431\u044b\u0442\u044c \u043d\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c console.log(obj[Symbol('a')]); \/\/ undefined console.log(obj['a']); \/\/ undefined  \/\/ \u041a\u043b\u044e\u0447\u0438-\u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043d\u0435 \"\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f\" (enumerated) \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 `for\/in`. for (const i in obj) {   console.log(i); \/\/ \"c\", \"d\" }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"es2020\">ES2020<\/h3>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/Optional_chaining\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \/ Optional chaining<\/a> (<code>?.<\/code>)__: \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e\/\u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e (<code>undefined<\/code>) \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0420\u0430\u043d\u044c\u0448\u0435: \/\/ \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \/\/ \u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 const object: { name: string } | undefined = Math.random() > 0.5 ? undefined : { name: 'test' }; const value = object.name; \/\/ TypeError: 'object' is possibly 'undefined'  \/\/ \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \"\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c\" \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \/\/ \u042d\u0442\u043e \u0443\u0445\u0443\u0434\u0448\u0430\u043b\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 const objectOld: { name: string } | undefined = Math.random() > 0.5 ? undefined : { name: 'test' }; const valueOld = objectOld ? objectOld.name : undefined;  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: \/\/ \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \/\/ \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 const objectNew: { name: string } | undefined = Math.random() > 0.5 ? undefined : { name: 'test' }; const valueNew = objectNew?.name;  \/\/ \u0415\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 const array: string[] | undefined = Math.random() > 0.5 ? undefined : ['test']; const item = array?.[0]; const func: (() => string) | undefined = Math.random() > 0.5 ? undefined : () => 'test'; const result = func?.();<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/Nullish_coalescing\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u0438\u044f\u043d\u0438\u044f \/ Nullish coalescing operator<\/a> (<code>??<\/code>)__: \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>||<\/code>. \u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>||<\/code> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u043b\u043e\u0436\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c, \u0430 <code>??<\/code> \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u043a <code>undefined<\/code> \u0438 <code>null<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const value: string | undefined = Math.random() > 0.5 ? undefined : 'test';  \/\/ \u0420\u0430\u043d\u044c\u0448\u0435: \/\/ \u0414\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 `||` const anotherValue = value || 'hello'; console.log(anotherValue); \/\/ \"test\" \u0438\u043b\u0438 \"hello\"  \/\/ \u042d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e const incorrectValue = '' || 'incorrect'; console.log(incorrectValue); \/\/ \u0432\u0441\u0435\u0433\u0434\u0430 \"incorrect\" const anotherIncorrectValue = 0 || 'incorrect'; console.log(anotherIncorrectValue); \/\/ \u0432\u0441\u0435\u0433\u0434\u0430 \"incorrect\"  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: \/\/ \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u0438\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 `undefined` \u0438 `null` const newValue = value ?? 'hello'; console.log(newValue) \/\/ \"test\" \u0438\u043b\u0438 \"hello\"  \/\/ \u041b\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f const correctValue = '' ?? 'incorrect'; console.log(correctValue); \/\/ \u0432\u0441\u0435\u0433\u0434\u0430 \"\" const anotherCorrectValue = 0 ?? 'incorrect'; console.log(anotherCorrectValue); \/\/ \u0432\u0441\u0435\u0433\u0434\u0430 0<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/import\"><code>import()<\/code><\/a><\/strong>: \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u2014 \u043a\u0430\u043a <code>import ... from '...'<\/code>, \u043d\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">let importModule; if (shouldImport) {   importModule = await import('.\/module.mjs'); }<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/matchAll\"><code>String.matchAll()<\/code><\/a>__: \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u0437\u0430\u0445\u0432\u0430\u0442\u0430 (capture groups), \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const stringVar = 'testhello,testagain,';  \/\/ \u0420\u0430\u043d\u044c\u0448\u0435: \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f, \u043d\u043e \u0431\u0435\u0437 \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 console.log(stringVar.match(\/test([\\w]+?),\/g)); \/\/ [\"testhello,\", \"testagain,\"]  \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0434\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441 \u0433\u0440\u0443\u043f\u043f\u043e\u0439 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 const singleMatch = stringVar.match(\/test([\\w]+?),\/); if (singleMatch) {   console.log(singleMatch[0]); \/\/ \"testhello,\"   console.log(singleMatch[1]); \/\/ \"hello\" }  \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 (\u043c\u0435\u0442\u043e\u0434 `exec` \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f) \/\/ `execMatch` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0446\u0438\u043a\u043b\u0430 (\u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f) \u0438 \u0431\u044b\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c (\u0444\u043b\u0430\u0433 `g`), \/\/ \u0438\u043d\u0430\u0447\u0435 \u0446\u0438\u043a\u043b \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c const regex = \/test([\\w]+?),\/g; let execMatch; while ((execMatch = regex.exec(stringVar)) !== null) {   console.log(execMatch[0]); \/\/ \"testhello,\", \"testagain,\"   console.log(execMatch[1]); \/\/ \"hello\", \"again\" }  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: \/\/ \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c const matchesIterator = stringVar.matchAll(\/test([\\w]+?),\/g); \/\/ \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 (Array.from()), \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d for (const match of matchesIterator) {   console.log(match[0]); \/\/ \"testhello,\", \"testagain,\"   console.log(match[1]); \/\/ \"hello\", \"again\" }<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Promise\/allSettled\"><code>Promise.allSettled()<\/code><\/a>__: \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Promise\/all\"><code>Promise.all()<\/code><\/a>, \u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u0442 (\u043b\u044e\u0431\u043e\u0433\u043e) \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u0432, \u0430 \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u0447\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">async function success1() { return 'a' }; async function success2() { return 'b' }; async function fail1() { throw 'fail 1' }; async function fail2() { throw 'fail 2' };  \/\/ \u0420\u0430\u043d\u044c\u0448\u0435: console.log(await Promise.all([success1(), success2()])); \/\/ [\"a\", \"b\"] \/\/ \u043d\u043e: try {   await Promise.all([success1(), success2(), fail1(), fail2()]); } catch (e) {   console.log(e); \/\/ \"fail 1\" } \/\/ \u041c\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \"\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c\" \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c  \/\/ \u0424\u0438\u043a\u0441 (\u043f\u043b\u043e\u0445\u043e\u0439 \u043a\u043e\u0434): console.log(await Promise.all([ \/\/ [\"a\", \"b\", undefined, undefined]   success1().catch(e => { console.log(e); }),   success2().catch(e => { console.log(e); }),   fail1().catch(e => { console.log(e); }), \/\/ \"fail 1\"   fail2().catch(e => { console.log(e); })])); \/\/ \"fail 2\"  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: const results = await Promise.allSettled([success1(), success2(), fail1(), fail2()]); const successfulResults = results   .filter(result => result.status === 'fulfilled')   .map(result => (result as PromiseFulfilledResult&lt;string>).value); console.log(successfulResults); \/\/ [\"a\", \"b\"] results.filter(result => result.status === 'rejected').forEach(error => {   console.log((error as PromiseRejectedResult).reason); \/\/ \"fail 1\", \"fail 2\" }); \/\/ \u0438\u043b\u0438: for (const result of results) {   if (result.status === 'fulfilled') {     console.log(result.value); \/\/ \"a\", \"b\"   } else if (result.status === 'rejected') {     console.log(result.reason); \/\/ \"fail 1\", \"fail 2\"   } }<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/BigInt\"><code>BigInt<\/code><\/a>__: \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u044c (\u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438) \u0438 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 (\u0446\u0435\u043b\u044b\u043c\u0438) \u0447\u0438\u0441\u043b\u0430\u043c\u0438. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <code>BigInt<\/code>, \u043b\u0438\u0431\u043e \u0441\u0438\u043c\u0432\u043e\u043b <code>n<\/code> \u0432 \u043a\u043e\u043d\u0446\u0435 \u0447\u0438\u0441\u043b\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0420\u0430\u043d\u044c\u0448\u0435: \/\/ JS \u0445\u0440\u0430\u043d\u0438\u0442 \u0447\u0438\u0441\u043b\u0430 \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0447\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043b\u0435\u0447\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u0442\u0435\u0440\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \/\/ \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 const maxSafeInteger = 9007199254740991; console.log(maxSafeInteger === Number.MAX_SAFE_INTEGER); \/\/ true  \/\/ \u0411\u041e\u043b\u044c\u0448\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e console.log(Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2); \/\/ true  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: \/\/ \u0422\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 `BigInt` \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 (\u0446\u0435\u043b\u044b\u043c\u0438) \u0447\u0438\u0441\u043b\u0430\u043c\u0438 const maxSafeIntegerPreviously = 9007199254740991n; console.log(maxSafeIntegerPreviously); \/\/ 9007199254740991  const anotherWay = BigInt(9007199254740991); console.log(anotherWay); \/\/ 9007199254740991  \/\/ \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c MAX_SAFE_INTEGER const incorrect = BigInt(9007199254740992); console.log(incorrect); \/\/ 9007199254740992 const incorrectAgain = BigInt(9007199254740993); console.log(incorrectAgain); \/\/ 9007199254740992  \/\/ \u041d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 const correct = BigInt('9007199254740993'); console.log(correct); \/\/ 9007199254740993 const correctAgain = 9007199254740993n; console.log(correctAgain); \/\/ 9007199254740993  \/\/ \u0414\u0440\u0443\u0433\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a const hex = BigInt('0x1fffffffffffff'); console.log(hex); \/\/ 9007199254740991 const octal = BigInt('0o377777777777777777'); console.log(octal); \/\/ 9007199254740991 const binary = BigInt('0b11111111111111111111111111111111111111111111111111111'); console.log(binary); \/\/ 9007199254740991  \/\/ \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f, \/\/ \u0435\u0441\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434 \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f `BigInt` \/\/ \u0412\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 `BigInt` const addition = maxSafeIntegerPreviously + 2n; console.log(addition); \/\/ 9007199254740993  const multiplication = maxSafeIntegerPreviously * 2n; console.log(multiplication); \/\/ 18014398509481982  const subtraction = multiplication - 10n; console.log(subtraction); \/\/ 18014398509481972  const modulo = multiplication % 10n; console.log(modulo); \/\/ 2  const exponentiation = 2n ** 54n; console.log(exponentiation); \/\/ 18014398509481984  const exponentiationAgain = 2n^54n; console.log(exponentiationAgain); \/\/ 18014398509481984  const negative = exponentiation * -1n; console.log(negative); \/\/ -18014398509481984  \/\/ \u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0430\u0447\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 `BigInt` \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 const division = multiplication \/ 2n; console.log(division); \/\/ 9007199254740991 \/\/ \u0414\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u0442\u043a\u0430, \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e  \/\/ \u0418\u043d\u0430\u0447\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 const divisionAgain = 5n \/ 2n; console.log(divisionAgain); \/\/ 2  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u043e\u0439 console.log(0n === 0); \/\/ false console.log(0n == 0); \/\/ true  \/\/ \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f console.log(1n &lt; 2); \/\/ true console.log(2n > 1); \/\/ true console.log(2 > 2); \/\/ false console.log(2n > 2); \/\/ false console.log(2n >= 2); \/\/ true  \/\/ \u0422\u0438\u043f console.log(typeof 1n); \/\/ \"bigint\"<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/globalThis\"><code>globalThis<\/code><\/a>__: \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u0431\u0440\u0430\u0443\u0437\u0435\u0440, Node.js \u0438 \u0434\u0440.):<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">console.log(globalThis.Math); \/\/ \u043e\u0431\u044a\u0435\u043a\u0442 `Math`<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/import.meta\">import.meta<\/a><\/strong>: \u0432 \u0447\u0438\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 ES, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a URL \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">console.log(import.meta.url); \/\/ \"file:\/\/...\"<\/code><\/pre>\n<p>  <\/p>\n<p><strong>export * as\u2026 from &#8216;&#8230;&#8217;<\/strong>: \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c (re-export) \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0443\u0431\u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">export * as am from 'another-module'  import { am } from 'module'<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"es2021\">ES2021<\/h3>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/replaceAll\">String.replaceAll()<\/a>__: \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0444\u043b\u0430\u0433\u043e\u043c <code>g<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const testString = 'hello\/greetings everyone\/everybody'; \/\/ \u0420\u0430\u043d\u044c\u0448\u0435: \/\/ \u0417\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 console.log(testString.replace('\/', '|')); \/\/ 'hello|greetings everyone\/everybody'  \/\/ \u0417\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \/\/ \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 + \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 + \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 console.log(testString.replace(\/\\\/\/g, '|')); \/\/ 'hello|greetings everyone|everybody'  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: \/\/ \u0417\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \/\/ \u0427\u0438\u0449\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 console.log(testString.replaceAll('\/', '|')); \/\/ 'hello|greetings everyone|everybody'<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Promise\/any\">Promise.any()<\/a>__: \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u043e\u0435 &#171;\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u0432 (\u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f <code>AggregateError<\/code>), \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Promise\/race\"><code>Promise.race()<\/code><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u043c\u0438\u0441\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">async function success1() { return 'a' }; async function success2() { return 'b' }; async function fail1() { throw 'fail 1' }; async function fail2() { throw 'fail 2' };  \/\/ \u0420\u0430\u043d\u044c\u0448\u0435: console.log(await Promise.race([success1(), success2()])); \/\/ \"a\" \/\/ \u043d\u043e: try {   await Promise.race([fail1(), fail2(), success1(), success2()]); } catch (e) {   console.log(e); \/\/ \"fail 1\" } \/\/ \u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \"\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c\" \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c  \/\/ \u0424\u0438\u043a\u0441 (\u043f\u043b\u043e\u0445\u043e\u0439 \u043a\u043e\u0434): console.log(await Promise.race([ \/\/ \"a\"   fail1().catch(e => { console.log(e); }), \/\/ \"fail 1\"   fail2().catch(e => { console.log(e); }), \/\/ \"fail 2\"   success1().catch(e => { console.log(e); }),   success2().catch(e => { console.log(e); })]));  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: console.log(await Promise.any([fail1(), fail2(), success1(), success2()])); \/\/ \"a\" try {   await Promise.any([fail1(), fail2()]); } catch (e) {   console.log(e); \/\/ [AggregateError]   console.log(e.errors); \/\/ [\"fail 1\", \"fail 2\"] }<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/Nullish_coalescing_assignment\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u0438\u044f\u043d\u0438\u044f \/ Nullish coalescing assignment<\/a> (<code>??=<\/code>)<\/strong>: \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>null<\/code> \u0438\u043b\u0438 <code>undefined<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">let x1 = undefined; let x2 = 'a'; const getNewValue = () => 'b';  x1 ??= 'b'; console.log(x1) \/\/ \"b\"  \/\/ \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: `getNewValue()` \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f x2 ??= getNewValue(); console.log(x1) \/\/ \"a\"<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/Logical_AND_assignment\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0418 \/ Logical and assignment<\/a> (<code>&amp;&amp;=<\/code>)<\/strong>: \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">let x1 = undefined; let x2 = 'a'; const getNewValue = () => 'b';  x1 &amp;&amp;= getNewValue(); console.log(x1) \/\/ undefined  x2 &amp;&amp;= 'b'; console.log(x1) \/\/ \"b\"<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/Logical_OR_assignment\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0418\u041b\u0418 \/ Logical or assignment<\/a> (<code>||=<\/code>)<\/strong>: \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">let x1 = undefined; let x2 = 'a'; const getNewValue = () => 'b';  x1 ||= 'b'; console.log(x1) \/\/ \"b\"  x2 ||= getNewValue(); console.log(x1) \/\/ \"a\"<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/WeakRef\"><code>WeakRef<\/code><\/a>__: \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 &#171;\u0441\u043b\u0430\u0431\u0443\u044e&#187; \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442. \u0421\u043b\u0430\u0431\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u043c \u043c\u0443\u0441\u043e\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const ref = new WeakRef(element);  \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\/\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043d\u0435 \u0431\u044b\u043b \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u043c \u043c\u0443\u0441\u043e\u0440\u0430 const value = ref.deref; console.log(value); \/\/ undefined \/\/ \u041f\u043e\u0445\u043e\u0436\u0435, \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442<\/code><\/pre>\n<p>  <\/p>\n<p>_<em>\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \/ Numeric literal separators (`<\/em>`)__: \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438, \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const int = 1_000_000_000; const float = 1_000_000_000.999_999_999; const max = 9_223_372_036_854_775_807n; const binary = 0b1011_0101_0101; const octal = 0o1234_5670; const hex = 0xD0_E0_F0;<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"es2022\">ES2022<\/h3>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/await\"><code>await<\/code> \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \/ Top level await<\/a><\/strong>: \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>await<\/code> \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0447\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">async function asyncFuncSuccess() {   return 'test'; } async function asyncFuncFail() {   throw new Error('Test'); }  \/\/ \u0420\u0430\u043d\u044c\u0448\u0435: \/\/ \u0416\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0438\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \/\/ await asyncFuncSuccess(); \/\/ SyntaxError: await is only valid in async functions \/\/ \u041e\u0431\u0435\u0440\u0442\u043a\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u043e\u0442\u0435\u0440\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0437\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 try {   (async () => {     console.log(await asyncFuncSuccess()); \/\/ \"test\"     try {       await asyncFuncFail();     } catch (e) {       \/\/ \u0418\u043d\u0430\u0447\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u044b (\u0438\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u0437\u0434\u043d\u043e \u0441 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u043d\u043e\u0439 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0441\u0442\u0435\u043a\u0430)       console.error(e); \/\/ Error: \"Test\"       throw e;     }   })(); } catch (e) {   \/\/ \u041d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u0437\u0434\u043d\u043e   console.error(e); } \/\/ \u0412\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0438\u0441\u0430 console.log('Hey'); \/\/ \"Hey\"  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: \/\/ \u0424\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0435\u043c (`\"type\"\" \"module\"` \u0432 `package.json` \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \".mjs\") console.log(await asyncFuncSuccess()); \/\/ \"test\" try {   await asyncFuncFail(); } catch (e) {   console.error(e); \/\/ Error: \"Test\" } \/\/ \u0412\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0438\u0441\u0430 console.log('Hello'); \/\/ \"Hello\"<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Classes\/Private_class_fields\"><code>#private<\/code><\/a><\/strong>: \u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 (\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b) \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c\u0438 (\u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c\u0438). \u0422\u0430\u043a\u0438\u0435 \u0447\u043b\u0435\u043d\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b. \u041e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438. \u041b\u044e\u0431\u043e\u0435 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 JS. \u0412 TS-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>private<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">class ClassWithPrivateField {   #privateField;   #anotherPrivateField = 4;    constructor() {     this.#privateField = 42; \/\/ Ok     this.#privateField; \/\/ SyntaxError     this.#undeclaredField = 444; \/\/ SyntaxError     console.log(this.#anotherPrivateField); \/\/ 4   } }  const instance = new ClassWithPrivateField(); instance.#privateField === 42; \/\/ SyntaxError<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Classes\/static\">\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0447\u043b\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \/ Static class members<\/a><\/strong>: \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 (\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434) \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">class Logger {   static id = 'Logger1';   static type = 'GenericLogger';   static log(message: string | Error) {     console.log(message);   } }  class ErrorLogger extends Logger {   static type = 'ErrorLogger';   static qualifiedType;   static log(e: Error) {     return super.log(e.toString());   } }  console.log(Logger.type); \/\/ \"GenericLogger\" Logger.log('Test'); \/\/ \"Test\"  \/\/ \u0418\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043b\u044f, \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438 \/\/ \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0446\u0435\u043b\u044f\u0445 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 const log = new Logger();  ErrorLogger.log(new Error('Test')); \/\/ Error: \"Test\" (\u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432) console.log(ErrorLogger.type); \/\/ \"ErrorLogger\" console.log(ErrorLogger.qualifiedType); \/\/ undefined console.log(ErrorLogger.id); \/\/ \"Logger1\"  \/\/ \u0412\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 `log` - \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u0430 \u043d\u0435 \u043c\u0435\u0442\u043e\u0434 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 console.log(log.log()); \/\/ log.log is not a function<\/code><\/pre>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Classes\/Static_initialization_blocks\">\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \/ Static initialization blocks<\/a><\/strong>: \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0442\u0430\u043a\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 &#171;\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432&#187; \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">class Test {   static staticProperty1 = 'Property 1';   static staticProperty2;   static {     this.staticProperty2 = 'Property 2';   } }  console.log(Test.staticProperty1); \/\/ \"Property 1\" console.log(Test.staticProperty2); \/\/ \"Property 2\"<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \/ Import assertion (\u043f\u043e\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 V8)<\/strong>: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u041c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 JSON \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import json from '.\/foo.json' assert { type: 'json' }; console.log(json.answer); \/\/ 42<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \/ RegExp match indices<\/strong>: \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0430. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <code>RegExp.exec()<\/code>, <code>RegExp.match()<\/code> \u0438 <code>String.matchAll()<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const matchObj = \/(test+)(hello+)\/d.exec('start-testesthello-stop');  \/\/ \u0420\u0430\u043d\u044c\u0448\u0435: console.log(matchObj?.index); \/\/ 9 - \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f  \/\/ \u0421\u0435\u0439\u0447\u0430\u0441: if (matchObj) {   \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f   console.log(matchObj.indices[0]); \/\/ [9, 18]    \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0433\u0440\u0443\u043f\u043f \u0437\u0430\u0445\u0432\u0430\u0442\u0430   console.log(matchObj.indices[1]); \/\/ [9, 13]   console.log(matchObj.indices[2]); \/\/ [13, 18] }<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/at\">\u041d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \/ Negative indexing<\/a>__: \u043c\u0435\u0442\u043e\u0434 <code>Array.at<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u043a\u043e\u043d\u0446\u0430 (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432). <code>at(-1)<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043e\u043c <code>arr[arr.length - 1]<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">console.log([4, 5].at(-1)) \/\/ 5  const array = [4, 5]; array.at(-1) = 3; \/\/ SyntaxError<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Object\/hasOwn\"><code>Object.hasOwn()<\/code><\/a>__: \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Object\/hasOwnProperty\"><code>Object.hasOwnProperty()<\/code><\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u0440\u0430\u0439\u043d\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const obj = { name: 'test' };  console.log(Object.hasOwn(obj, 'name')); \/\/ true console.log(Object.hasOwn(obj, 'gender')); \/\/ false<\/code><\/pre>\n<p>  <\/p>\n<p>__<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Error\/cause\">\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \/ Error cause<\/a>__: \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u0432\u044b\u0431\u0440\u043e\u0441\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (re-throwing) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Error\/Error\"><code>Error<\/code><\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <code>cause<\/code>, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">try {   try {     connectToDatabase();   } catch (err) {     throw new Error('\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.', { cause: err });   } } catch (err) {   console.log(err.cause); \/\/ ReferenceError: connectToDatabase is not defined }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c JS, \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 TS.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0438 \u043d\u0435 \u0437\u0440\u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  <\/p>\n<p>Happy coding!<\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p><a href=\"https:\/\/timeweb.cloud\/vds-vps?utm_source=habr&amp;utm_medium=banner&amp;utm_campaign\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/mx\/ua\/nb\/mxuanbovcusqgmqdgugvpnql8vq.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/mx\/ua\/nb\/mxuanbovcusqgmqdgugvpnql8vq.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/timeweb\/blog\/722450\/\"> https:\/\/habr.com\/ru\/company\/timeweb\/blog\/722450\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ma\/po\/lv\/mapolvqq4uunxfqoaviv3g9km9y.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ma\/po\/lv\/mapolvqq4uunxfqoaviv3g9km9y.jpeg\" data-blurred=\"true\"\/>  <\/p>\n<p>  Hello, world!<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 <a href=\"https:\/\/betterprogramming.pub\/all-javascript-and-typescript-features-of-the-last-3-years-629c57e73e42\">\u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c JS \u0438 TS \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0442\u0440\u0435\u0445 \u043b\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 JS, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 TS.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><em>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/em>: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b MDN.<\/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-346763","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346763","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=346763"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346763\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}