{"id":297090,"date":"2020-01-13T21:00:18","date_gmt":"2020-01-13T21:00:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297090"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-01-13T21:00:18","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297090","title":{"rendered":"5 \u0444\u0438\u0447 JavaScript, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0435 \u043c\u043e\u0433 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 (\u043f\u0435\u0440\u0435\u0432\u043e\u0434)"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/483822\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/b1\/nz\/gn\/b1nzgnnpsefqktdgd6srd-jyg1a.jpeg\"><\/p>\n<p>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0434\u0440\u0443\u0437\u044c\u044f!<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0412\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 Kent Dodds <a href=\"https:\/\/www.javascriptjanuary.com\/blog\/5-javascript-features-i-couldnt-code-without\">\u00ab5 JavaScript Features I Couldn&#8217;t Code Without\u00bb.<\/a><\/p>\n<p>  \u042d\u0442\u043e \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043b\u044e\u0431\u044b\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c.<\/p>\n<h2>5 \u0444\u0438\u0447 JavaScript, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0435 \u043c\u043e\u0433 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434<\/h2>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u043c\u043d\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0438\u0448\u0443. \u041f\u043e\u0447\u0442\u0438 \u0432\u0435\u0441\u044c \u043c\u043e\u0439 \u043a\u043e\u0434 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 Javascript, \u043f\u043b\u044e\u0441 \u043d\u0435\u043c\u043d\u043e\u0433\u043e HTML \u0438 CSS. \u042f \u043f\u0438\u0448\u0443 \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439, \u0442\u0430\u043a \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 JS. \u042f \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e \u0441\u0432\u043e\u0439 \u043a\u043e\u0434. \u042f \u0441\u043e\u0437\u0434\u0430\u044e \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443. \u0414\u043b\u044f \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e React, \u0434\u043b\u044f \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u2014 Express \u0438\u043b\u0438 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0412\u043e\u0442 5 \u0444\u0438\u0447 JS, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0435 \u043c\u043e\u0433 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434. \u0412 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u00ab\u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0435 \u043c\u043e\u0433 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434\u00bb \u2014 \u044d\u0442\u043e \u0433\u0438\u043f\u0435\u0440\u0431\u043e\u043b\u0430. \u042d\u0442\u043e \u0444\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>1. \u0414\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044d\u0442\u0443 \u0444\u0438\u0447\u0443 \u043f\u043e\u0447\u0442\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u0430\u0445. \u041d\u0435\u0432\u0430\u0436\u043d\u043e, \u043e React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u0438\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u0438\u043b\u0438 \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430.<\/p>\n<p>  \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">const address = {   city: 'Salt Lake City',   state: 'UT',   zip: 84115,   coords: {     lat: 40.776608,     long: -111.920485,   }, }  \/\/ \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e: const city = address.city const state = address.state const zip = address.zip  \/\/ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a: const {city, state, zip} = address  <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 React:  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0431\u0435\u0437 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438: function UserName(props) {   return (     &lt;div&gt;             &lt;\/div&gt;   ) }  \/\/ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438: function UserName() {   return (     &lt;div&gt;             &lt;\/div&gt;   ) }  \/\/ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438: function UserName({name: {first, last}}) {   return (     &lt;div&gt;             &lt;\/div&gt;   ) } <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0438\u0447\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u0449\u0438:<\/p>\n<pre><code class=\"javascript\">const info = {   title: 'Once Upon a Time',   protagonist: {     name: 'Emma Swan',     enemies: [       {name: 'Regina Mills', title: 'Evil Queen'},       {name: 'Cora Mills', title: 'Queen of Hearts'},       {name: 'Peter Pan', title: `The boy who wouldn't grow up`},       {name: 'Zelena', title: 'The Wicked Witch'},     ],   }, }  \/\/ \u043f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430, \/\/ \u0445\u043e\u0442\u044f \u043d\u0435 \u0432\u0441\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442 \u043c\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0441\u0447\u0435\u0442 const {   title,   protagonist: {     name: name,     enemies: [, , , {title: enemyTitle, name: enemyName}],   }, } = info  console.log(`$ ($) is an enemy to $ in \"$5 JavaScript Features I Couldn't Code Without\"`) <\/code><\/pre>\n<p>  <\/p>\n<h3>2. \u041c\u043e\u0434\u0443\u043b\u0438<\/h3>\n<p>  \u042d\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0444\u0438\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u0414\u043e \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u0438 \u0441\u0442\u0430\u043b\u0438 \u0447\u0430\u0441\u0442\u044c\u044e \u044f\u0437\u044b\u043a\u0430, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u0421 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 (\u0438 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a Rollup \u0438\u043b\u0438 Webpack) \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u0434\u043e\u043c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">\/\/ a.js \/\/ \u044d\u043a\u0441\u043f\u043e\u0440\u0442 function add(a, b) {   return a + b }  const foo = 'bar'  const theAnswer = 42 const theQuestion = 'who knows'     \/\/ \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u043d\u043e \/\/ \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432\u0441\u0435 \"\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u044b\" \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 export default add export {foo, theAnswer, theQuestion}  \/\/ b.js \/\/ \u0438\u043c\u043f\u043e\u0440\u0442 \/\/ 1. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c import '.\/a'  \/\/ 2. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e import add from '.\/a'  \/\/ 3. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c `theAnswer` \u0438 `theQuestion` \u0438\u0437 '.\/a' import {theAnswer, theQuestion} from '.\/a'  \/\/ 4. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c `theAnswer` \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 `fortyTwo` import {theAnswer as fourtyTwo} from '.\/a'  \/\/ 5. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c `add` (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0438 `theQuestion` import {default as add, theQuestion} from '.\/a'  \/\/ 6. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c `add` \u0438 `theQuestion` \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e import add,  from '.\/a'     \/\/ 7. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0432 \u0435\u0434\u0438\u043d\u043e\u0435 \"\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d\" \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c `allTheThings` import * as allTheThings from '.\/a' <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043c\u043e\u0434\u0443\u043b\u044f\u0445, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0435 \u0432\u0438\u0434\u0435\u043e \u043d\u0430 youtube \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=kTlcu16rSLc&amp;list=PLV5CVI1eNcJgNqzNwcs4UKrlJdhfDjshf\">\u00abMore than you want to know about ES6 Modules\u00bb.<\/a><\/p>\n<h3>3. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h3>\n<p>  \u042f \u043b\u044e\u0431\u043b\u044e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044d\u0442\u0443 \u0444\u0438\u0447\u0443 \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f. \u042d\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u0430\u043a \u0438 \u043a \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">const bench = {type: 'Piano', adjustable: false} const {legs = 4} = bench \/\/ `The bench has $ legs` \/\/ -&gt; The bench has 4 legs \/\/ bench - \u0441\u043a\u0430\u043c\u044c\u044f, leg - \u043d\u043e\u0436\u043a\u0430 <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 bench \u043d\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 legs. \u0411\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c legs \u0431\u0443\u0434\u0435\u0442 undefined.<\/p>\n<p>  \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0441 \u044d\u0442\u043e\u0439 \u0444\u0438\u0447\u0435\u0439:<\/p>\n<pre><code class=\"javascript\">const bench = {type: 'Piano', adjustable: false} const {legs: legCount = 4} = bench \/\/ `The bench has $ legs` \/\/ -&gt; The bench has 4 legs <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">function getDisplayName(firstName = 'Unknown', lastName = 'Unknown') {   return `$ $` }  \/\/ getDisplayName() \/\/ -&gt; Unknown Unknown  \/\/ getDisplayName('Andrew') \/\/ -&gt; Andrew Unknown  \/\/ getDisplayName(undefined, 'Yang') \/\/ -&gt; Unknown Yang  \/\/ getDisplayName('Andrew', 'Yang') \/\/ -&gt; Andrew Yang <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0438\u0447\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u0449\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430 &#171;=&#187; \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">function getCandy(   kind = requiredParam('kind'),   size = requiredParam('size'),   upperKind = kind.toUpperCase(),   callback = function noop() {}, ) {   const result = {kind, size, upperKind}   callback(result)   return result }  function requiredParam(argName) {   throw new Error(`$ is required`) }  \/\/ getCandy('twix', 'king') \/\/ -&gt; {kind: 'twix', size: 'king', upperKind: 'TWIX'} \/\/ getCandy('twix') \/\/ -&gt; \u043e\u0448\u0438\u0431\u043a\u0430: 'size is required' <\/code><\/pre>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d\u0438 \u043f\u0440\u0430\u0432\u044b. \u041d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e!<\/p>\n<p>  \u041e, \u0430 \u0412\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 upperKind)? \u0417\u0434\u043e\u0440\u043e\u0432\u043e, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<h3>4. \u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>  \u042f \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0435\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 (\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043d\u0435 \u0445\u043e\u0447\u0443 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0438\u043c\u044f), \u0438\u043b\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u044f\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u043e, \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<pre><code class=\"javascript\">const divide = (a, b) =&gt; a \/ b const getFive = () =&gt; 5 const identity = i =&gt; i const asArray = (...args) =&gt; args  \/\/ \u043e\u0431\u044b\u0447\u043d\u043e, \u044f \u043d\u0435 \u0438\u043c\u0435\u043d\u0443\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \/\/ (\u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f), \/\/ \u043d\u043e \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0445 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435: const tryInvoke = (obj, fn, ...args) =&gt; {   try {     return obj[fn](...args)   } catch (e) {     return undefined   } }     \/\/ \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 const getObject = favoriteCandy =&gt; ()  \/\/ \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 JSX (\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 JS \u0432 React) \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 const MyComponent = () =&gt; (   &lt;div&gt;     Hello world! I am a function and I return &lt;strong&gt;JSX!&lt;\/strong&gt;   &lt;\/div&gt; ) <\/code><\/pre>\n<p>  <\/p>\n<h3>5. \u041f\u0440\u043e\u043c\u0438\u0441\u044b \u0438 async\/await<\/h3>\n<p>  JS \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 (\u0441\u0442\u0435\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432). \u042f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u043a\u043b\u043e\u043d\u043d\u0438\u043a \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043e\u0432 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/www.youtube.com\/watch?v=8aGhZQkoFbQ\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 event loop?<\/a> (\u0441 \u0440\u0443\u0441\u0441\u043a\u0438\u043c\u0438 \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u0430\u043c\u0438). \u041f\u0440\u043e\u043c\u0438\u0441\u044b \u0438 async\/await \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u043c\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043f\u0440\u043e\u043c\u0438\u0441\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u00ab\u043f\u0440\u0438\u0432\u044b\u043a\u0430\u043d\u0438\u044f\u00bb, \u043d\u043e \u043e\u043d\u0438 \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0435.<\/p>\n<p>  \u042f \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e async\/await \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0438 \u0431\u044d\u043a\u0435\u043d\u0434\u0435. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">test('Can fill out a form across multiple pages', async () =&gt; {   mockSubmitForm.mockResolvedValueOnce({success: true})   const testData = {food: 'test food', drink: 'test drink'}   const {findByLabelText, findByText} = render(&lt;App \/&gt;)    user.click(await findByText(\/fill.*form\/i))    user.type(await findByLabelText(\/food\/i), testData.food)   user.click(await findByText(\/next\/i))    user.type(await findByLabelText(\/drink\/i), testData.drink)   user.click(await findByText(\/review\/i))    expect(await findByLabelText(\/food\/i)).toHaveTextContent(testData.food)   expect(await findByLabelText(\/drink\/i)).toHaveTextContent(testData.drink)    user.click(await findByText(\/confirm\/i, {selector: 'button'}))    expect(mockSubmitForm).toHaveBeenCalledWith(testData)   expect(mockSubmitForm).toHaveBeenCalledTimes(1)    user.click(await findByText(\/home\/i))    expect(await findByText(\/welcome home\/i)).toBeInTheDocument() }) <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f async\\await \u0432 Express:<\/p>\n<pre><code class=\"javascript\">async function getListItems(req, res) {   const listItems = await listItemsDB.query({ownerId: req.user.id})   res.json({listItems: await expandBookDataMultiple(listItems)}) } <\/code><\/pre>\n<p>  \u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e, \u0447\u0442\u043e \u044f \u043d\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e async\/await \u0432 \u0441\u0432\u043e\u0435\u043c React-\u043a\u043e\u0434\u0435 (\u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e). \u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044f \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u00ab\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438\u00bb \u0432\u043d\u0435 \u043c\u043e\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0435\u043b\u0430\u044e \u0447\u0442\u043e-\u0442\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 useEffect \u0432 React, \u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0441\u044c \u043e\u0434\u043d\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0441 \u043f\u0440\u043e\u043c\u0438\u0441\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043b\u0435\u0433\u0447\u0435:<\/p>\n<pre><code class=\"javascript\">React.useEffect(() =&gt; {   getUser().then(     user =&gt; setState({status: 'success', error: null, user}),     error =&gt; setState({status: 'error', error, user: null}),   ) }, []) <\/code><\/pre>\n<p>  \u0421\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e Anthony Chu <a href=\"https:\/\/anthonychu.ca\/post\/node-async-await-azure-app-service\/\">\u00abAsync\/Await in Node\u00bb.<\/a><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0438\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0432\u043e\u0439\u0442\u0438 \u0432 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a. \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0447\u0438 \u2014 \u043c\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435, \u043a \u043d\u0438\u043c \u044f \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0441\u044c. \u0418\u043c\u0435\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u0435\u0436\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a \u044f\u0437\u044b\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0435 \u043d\u0435 \u0432\u043e\u0448\u043b\u0438 \u0432 \u043c\u043e\u044e \u043c\u044b\u0448\u0435\u0447\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0442\u044c JS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c! \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0412\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439! \u0423\u0434\u0430\u0447\u0438!<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <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\/post\/483822\/\"> https:\/\/habr.com\/ru\/post\/483822\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/483822\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/b1\/nz\/gn\/b1nzgnnpsefqktdgd6srd-jyg1a.jpeg\"><\/p>\n<p>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0434\u0440\u0443\u0437\u044c\u044f!<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0412\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 Kent Dodds <a href=\"https:\/\/www.javascriptjanuary.com\/blog\/5-javascript-features-i-couldnt-code-without\">\u00ab5 JavaScript Features I Couldn&#8217;t Code Without\u00bb.<\/a><\/p>\n<p>  \u042d\u0442\u043e \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043b\u044e\u0431\u044b\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c.<\/p>\n<h2>5 \u0444\u0438\u0447 JavaScript, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0435 \u043c\u043e\u0433 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434<\/h2>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u043c\u043d\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0438\u0448\u0443. \u041f\u043e\u0447\u0442\u0438 \u0432\u0435\u0441\u044c \u043c\u043e\u0439 \u043a\u043e\u0434 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 Javascript, \u043f\u043b\u044e\u0441 \u043d\u0435\u043c\u043d\u043e\u0433\u043e HTML \u0438 CSS. \u042f \u043f\u0438\u0448\u0443 \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439, \u0442\u0430\u043a \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 JS. \u042f \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e \u0441\u0432\u043e\u0439 \u043a\u043e\u0434. \u042f \u0441\u043e\u0437\u0434\u0430\u044e \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443. \u0414\u043b\u044f \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e React, \u0434\u043b\u044f \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u2014 Express \u0438\u043b\u0438 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0412\u043e\u0442 5 \u0444\u0438\u0447 JS, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0435 \u043c\u043e\u0433 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434. \u0412 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u00ab\u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0435 \u043c\u043e\u0433 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434\u00bb \u2014 \u044d\u0442\u043e \u0433\u0438\u043f\u0435\u0440\u0431\u043e\u043b\u0430. \u042d\u0442\u043e \u0444\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.  <\/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-297090","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297090","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=297090"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297090\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}