{"id":5109,"date":"2026-09-24T09:00:00","date_gmt":"2026-09-24T09:00:00","guid":{"rendered":"https:\/\/otus.ru\/journal\/?p=5109"},"modified":"2026-09-25T15:27:51","modified_gmt":"2026-09-25T15:27:51","slug":"funkcionalnoe-programmirovanie-v-javascript","status":"publish","type":"post","link":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/","title":{"rendered":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, map\/filter\/reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f"},"content":{"rendered":"<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u0424\u041f) \u0432 JavaScript<\/strong> &#8212; \u044d\u0442\u043e \u0441\u0442\u0438\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439: \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043d\u0430\u0440\u0443\u0436\u0438. JavaScript \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u043e\u043d \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0435\u043d\u043d\u044b\u0439: \u0424\u041f \u0437\u0434\u0435\u0441\u044c &#8212; \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u0435\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0437\u044b\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442, \u0430 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c.<\/p>\n<div class=\"oj-toc\" style=\"background:#f6f6f6;border-radius:8px;padding:14px 20px;margin:20px 0\">\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li><a href=\"#s1\">\u0427\u0435\u0442\u044b\u0440\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u0442\u0430\u044e\u0442<\/a><\/li>\n<li><a href=\"#s2\">\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0446\u0438\u043a\u043b \u043f\u0440\u043e\u0442\u0438\u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a><\/li>\n<li><a href=\"#s3\">\u0427\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b<\/a><\/li>\n<li><a href=\"#s4\">\u041d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c: \u0433\u0434\u0435 JavaScript \u043f\u043e\u0434\u0432\u043e\u0434\u0438\u0442<\/a><\/li>\n<li><a href=\"#s5\">map, filter, reduce: \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c<\/a><\/li>\n<li><a href=\"#s6\">\u0421\u0432\u043e\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430<\/a><\/li>\n<li><a href=\"#s7\">\u0417\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"#s8\">\u041a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/a><\/li>\n<li><a href=\"#s9\">\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f: pipe \u0438 compose<\/a><\/li>\n<li><a href=\"#s10\">\u0413\u0434\u0435 \u0424\u041f \u0432 JavaScript \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"#s11\">\u0412\u044b\u0432\u043e\u0434\u044b<\/a><\/li>\n<li><a href=\"#s12\">\u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \/ \u0441\u0432\u044f\u0437\u044c \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439<\/a><\/li>\n<li><a href=\"#s13\">FAQ<\/a><\/li>\n<\/ol>\n<\/div>\n<p>\u041e\u043f\u043e\u0440\u0430 \u0424\u041f \u043d\u0430 JS &#8212; \u043f\u044f\u0442\u044c \u0432\u0435\u0449\u0435\u0439: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 (<code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">filter<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code>), \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f. \u041d\u0438\u0436\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u0430 \u043d\u0430 \u043a\u043e\u0434\u0435 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0432\u043e\u0434\u043e\u043c. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b 24.09.2026 \u0432 Node.js 24.21 (\u0442\u0435\u043a\u0443\u0449\u0430\u044f LTS) \u0438 22.23; \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u0430\u043a \u0436\u0435, \u043d\u043e \u0442\u0435\u043a\u0441\u0442\u044b \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0442\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h2 id=\"s1\">\u0427\u0435\u0442\u044b\u0440\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u0442\u0430\u044e\u0442<\/h2>\n<ul>\n<li><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/strong> &#8212; \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u044f\u0437\u044b\u043a\u0430: \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 JavaScript \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0435.<\/li>\n<li><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430<\/strong> &#8212; \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043b\u0431\u044d\u043a.<\/li>\n<li><strong>\u0427\u0438\u0441\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/strong> &#8212; \u043f\u0440\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 (\u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u043d\u0435 \u043f\u0438\u0448\u0435\u0442 \u0432 \u0441\u0435\u0442\u044c, \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c).<\/li>\n<li><strong>\u0417\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435<\/strong> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0433\u0434\u0435 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043c\u043d\u0438\u0442 \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/li>\n<\/ul>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0432\u0442\u043e\u0440\u043e\u0435: \u0431\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">filter<\/code>. \u0427\u0438\u0441\u0442\u043e\u0442\u0430 \u0438 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f &#8212; \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430: \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0447\u0438\u0441\u0442\u044b\u043c, \u0438 \u043d\u0435\u0447\u0438\u0441\u0442\u044b\u043c.<\/p>\n<h2 id=\"s2\">\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0446\u0438\u043a\u043b \u043f\u0440\u043e\u0442\u0438\u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h2>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 &#8212; \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u044b\u0440\u0443\u0447\u043a\u0443 \u043f\u043e \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u044b\u043c \u0437\u0430\u043a\u0430\u0437\u0430\u043c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">orders<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0410\u043d\u043d\u0430\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1200<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">paid<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">true<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0411\u043e\u0440\u0438\u0441\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">800<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">paid<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">false<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">3<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0410\u043d\u043d\u0430\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">3500<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">paid<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">true<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0412\u0435\u0440\u0430\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">450<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">paid<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">true<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">];<\/span>\n\n<span style=\"color: #7F848E\">\/\/ \u0418\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e: \u0446\u0438\u043a\u043b \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f<\/span>\n<span style=\"color: #C678DD\">let<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">revenueLoop<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">for<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #C678DD\">let<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">&lt;<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">orders<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #56B6C2\">++<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">if<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">orders<\/span><span style=\"color: #ABB2BF\">[<\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\">].<\/span><span style=\"color: #E06C75\">paid<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">revenueLoop<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">orders<\/span><span style=\"color: #ABB2BF\">[<\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\">].<\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">  }<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #7F848E\">\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e: \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">revenue<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">orders<\/span>\n<span style=\"color: #ABB2BF\">  .<\/span><span style=\"color: #E06C75\">filter<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">order<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">order<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">paid<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">  .<\/span><span style=\"color: #E06C75\">map<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">order<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">order<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">  .<\/span><span style=\"color: #E06C75\">reduce<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">sum<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">sum<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">revenueLoop<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">revenue<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ 5150 5150<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">orders<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">);        <\/span><span style=\"color: #7F848E\">\/\/ 4 - \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f<\/span><\/code><\/pre>\n<p>\u041e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0432\u044b\u0432\u043e\u0434\u044f\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">5150<\/code>. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0434: \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u0427\u0422\u041e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (\u043e\u0442\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u044b\u0435, \u0432\u0437\u044f\u0442\u044c \u0441\u0443\u043c\u043c\u044b, \u0441\u043b\u043e\u0436\u0438\u0442\u044c), \u0430 \u0446\u0438\u043a\u043b &#8212; \u041a\u0410\u041a \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c. \u041a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">orders<\/code>.<\/p>\n<h2 id=\"s3\">\u0427\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b<\/h2>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #7F848E\">\/\/ \u041d\u0435\u0447\u0438\u0441\u0442\u0430\u044f: \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0435<\/span>\n<span style=\"color: #C678DD\">let<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">discount<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">10<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">let<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">calls<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">priceWithDiscountImpure<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">calls<\/span><span style=\"color: #56B6C2\">++<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">discount<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">\/<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">100<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #7F848E\">\/\/ \u0427\u0438\u0441\u0442\u0430\u044f: \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b<\/span>\n<span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">priceWithDiscount<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">percent<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">percent<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">\/<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">100<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">priceWithDiscountImpure<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">1000<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ 900<\/span>\n<span style=\"color: #E06C75\">discount<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">20<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">priceWithDiscountImpure<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">1000<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ 800 - \u0442\u043e\u0442 \u0436\u0435 \u0432\u0445\u043e\u0434, \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">priceWithDiscount<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">1000<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">10<\/span><span style=\"color: #ABB2BF\">));   <\/span><span style=\"color: #7F848E\">\/\/ 900 - \u0432\u0441\u0435\u0433\u0434\u0430 900 \u043f\u0440\u0438 \u0442\u0435\u0445 \u0436\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">calls<\/span><span style=\"color: #ABB2BF\">);                         <\/span><span style=\"color: #7F848E\">\/\/ 2 - \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442<\/span><\/code><\/pre>\n<p>\u0427\u0438\u0441\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043b\u0435\u0433\u043a\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442) \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u0435\u0437 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0430: \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a API, \u0437\u0430\u043f\u0438\u0441\u044c \u0432 DOM \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u044b. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0424\u041f &#8212; \u043d\u0435 \u00ab\u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00bb, \u0430 \u00ab\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043d\u0430 \u043a\u0440\u0430\u044f\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b\u00bb: \u0447\u0438\u0441\u0442\u043e\u0435 \u044f\u0434\u0440\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0430 \u0442\u043e\u043d\u043a\u0438\u0439 \u0441\u043b\u043e\u0439 \u0432\u043e\u043a\u0440\u0443\u0433 \u0447\u0438\u0442\u0430\u0435\u0442 \u0432\u0432\u043e\u0434 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h2 id=\"s4\">\u041d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c: \u0433\u0434\u0435 JavaScript \u043f\u043e\u0434\u0432\u043e\u0434\u0438\u0442<\/h2>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">const<\/code> \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043d\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c. \u0427\u0430\u0441\u0442\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 &#8212; \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u043b\u0447\u0430 \u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [<\/span><span style=\"color: #D19A66\">300<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">100<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">200<\/span><span style=\"color: #ABB2BF\">];<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sorted<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">sort<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">sorted<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ [ 100, 200, 300 ]<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ [ 100, 200, 300 ] - \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u043e\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">sorted<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">===<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ true<\/span><\/code><\/pre>\n<p><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">sort<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reverse<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">splice<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">push<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">pop<\/code> \u043c\u0435\u043d\u044f\u044e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#8212; \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b ES2023 (<code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">toSorted<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">toReversed<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">toSpliced<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">with<\/code>) \u0438\u043b\u0438 \u044f\u0432\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f; \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 &#8212; spread \u0441 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [<\/span><span style=\"color: #D19A66\">300<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">100<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">200<\/span><span style=\"color: #ABB2BF\">];<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sorted<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">toSorted<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ ES2023<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">copySorted<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [...<\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\">].<\/span><span style=\"color: #E06C75\">sort<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u044b\u0445 \u0441\u0440\u0435\u0434<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">sorted<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">copySorted<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ [ 100, 200, 300 ] [ 100, 200, 300 ]<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">prices<\/span><span style=\"color: #ABB2BF\">);             <\/span><span style=\"color: #7F848E\">\/\/ [ 300, 100, 200 ]<\/span>\n\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">user<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0410\u043d\u043d\u0430\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">address<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">city<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u041a\u0430\u0437\u0430\u043d\u044c\"<\/span><span style=\"color: #ABB2BF\"> } };<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">moved<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> { ...<\/span><span style=\"color: #E06C75\">user<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">address<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> { ...<\/span><span style=\"color: #E06C75\">user<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">address<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">city<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0421\u0430\u043c\u0430\u0440\u0430\"<\/span><span style=\"color: #ABB2BF\"> } };<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">user<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">address<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">city<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">moved<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">address<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">city<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ \u041a\u0430\u0437\u0430\u043d\u044c \u0421\u0430\u043c\u0430\u0440\u0430<\/span><\/code><\/pre>\n<p><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Object.freeze<\/code> \u0442\u043e\u0436\u0435 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #98C379\">\"use strict\"<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">config<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">Object<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">freeze<\/span><span style=\"color: #ABB2BF\">({ <\/span><span style=\"color: #E06C75\">mode<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"prod\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">limits<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">rps<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">100<\/span><span style=\"color: #ABB2BF\"> } });<\/span>\n<span style=\"color: #E06C75\">config<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">limits<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">rps<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">5<\/span><span style=\"color: #ABB2BF\">;           <\/span><span style=\"color: #7F848E\">\/\/ \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">config<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">limits<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">rps<\/span><span style=\"color: #ABB2BF\">);  <\/span><span style=\"color: #7F848E\">\/\/ 5<\/span>\n<span style=\"color: #E06C75\">config<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">mode<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"dev\"<\/span><span style=\"color: #ABB2BF\">;             <\/span><span style=\"color: #7F848E\">\/\/ TypeError \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">5\nTypeError: Cannot assign to read only property &#x27;mode&#x27; of object &#x27;#&lt;Object&gt;&#x27;\n<\/code><\/pre>\n<p>\u0412 \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 (\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u0437 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">\"use strict\"<\/code>) \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u0443\u043f\u0430\u0434\u0435\u0442, \u0430 \u043c\u043e\u043b\u0447\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442; \u0432 ES-\u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0432\u0441\u0435\u0433\u0434\u0430. \u0414\u043b\u044f \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0439 \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u043a\u0438 freeze \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440.<\/p>\n<h2 id=\"s5\">map, filter, reduce: \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u0417\u0430\u0434\u0430\u0447\u0430<\/th>\n<th>\u041c\u0435\u0442\u043e\u0434<\/th>\n<th>\u0427\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442<\/th>\n<th>\u041c\u0435\u043d\u044f\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code><\/td>\n<td>\u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u043e\u0439 \u0436\u0435 \u0434\u043b\u0438\u043d\u044b<\/td>\n<td>\u043d\u0435\u0442<\/td>\n<\/tr>\n<tr>\n<td>\u041e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">filter<\/code><\/td>\n<td>\u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0434\u043b\u0438\u043d\u0430 \u043e\u0442 0 \u0434\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439<\/td>\n<td>\u043d\u0435\u0442<\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0432\u0435\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e (\u0441\u0443\u043c\u043c\u0430, \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u0442\u0440\u043e\u043a\u0430)<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code><\/td>\n<td>\u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/td>\n<td>\u043d\u0435\u0442<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e (\u0432\u044b\u0432\u043e\u0434, \u0437\u0430\u043f\u0438\u0441\u044c)<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">forEach<\/code><\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">undefined<\/code><\/td>\n<td>\u043d\u0435\u0442, \u043d\u043e \u044d\u0442\u043e \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u041a\u043e\u043b\u0431\u044d\u043a <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">filter<\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u0440\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">(element, index, array)<\/code>. \u041a\u043e\u043b\u0431\u044d\u043a <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code> &#8212; \u0447\u0435\u0442\u044b\u0440\u0435: <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">(accumulator, currentValue, currentIndex, array)<\/code>. \u0418\u0437-\u0437\u0430 \u043b\u0438\u0448\u043d\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043b\u043e\u0432\u0443\u0448\u043a\u0430:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">([<\/span><span style=\"color: #98C379\">\"1\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"2\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"3\"<\/span><span style=\"color: #ABB2BF\">].<\/span><span style=\"color: #E06C75\">map<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E5C07B\">parseInt<\/span><span style=\"color: #ABB2BF\">));             <\/span><span style=\"color: #7F848E\">\/\/ [ 1, NaN, NaN ]<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">([<\/span><span style=\"color: #98C379\">\"1\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"2\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"3\"<\/span><span style=\"color: #ABB2BF\">].<\/span><span style=\"color: #E06C75\">map<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E5C07B\">parseInt<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">10<\/span><span style=\"color: #ABB2BF\">))); <\/span><span style=\"color: #7F848E\">\/\/ [ 1, 2, 3 ]<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">([<\/span><span style=\"color: #98C379\">\"1\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"2\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"3\"<\/span><span style=\"color: #ABB2BF\">].<\/span><span style=\"color: #E06C75\">map<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E5C07B\">Number<\/span><span style=\"color: #ABB2BF\">));                <\/span><span style=\"color: #7F848E\">\/\/ [ 1, 2, 3 ]<\/span><\/code><\/pre>\n<p><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">parseInt<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212; \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u0443\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441: <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">parseInt(\"2\", 1)<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">parseInt(\"3\", 2)<\/code> \u0434\u0430\u044e\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">NaN<\/code>. \u041f\u0440\u0430\u0432\u0438\u043b\u043e: \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0431\u0435\u0437 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0448\u044c \u0432\u0441\u0435 \u0435\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043b\u043e\u0432\u0443\u0448\u043a\u0430 &#8212; <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code> \u0431\u0435\u0437 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u0430 \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043e\u043d \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043a\u0430\u043a \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u0430 \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u043c \u0443\u043f\u0430\u0434\u0435\u0442:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">empty<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [];<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">empty<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">reduce<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">sum<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">sum<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ 0<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">empty<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">reduce<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">sum<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">sum<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">));    <\/span><span style=\"color: #7F848E\">\/\/ TypeError<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">0\nTypeError: Reduce of empty array with no initial value\n<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430 &#8212; \u043e\u043d\u043e \u0437\u0430\u043e\u0434\u043d\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0442\u0438\u043f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code> \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0443\u043c\u043c\u044b \u043f\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">orders<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0410\u043d\u043d\u0430\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1200<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0411\u043e\u0440\u0438\u0441\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">800<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"\u0410\u043d\u043d\u0430\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">3500<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">];<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">byCustomer<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">orders<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">reduce<\/span><span style=\"color: #ABB2BF\">(<\/span>\n<span style=\"color: #ABB2BF\">  (<\/span><span style=\"color: #E06C75\">acc<\/span><span style=\"color: #ABB2BF\">, { <\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #ABB2BF\"> }) =&gt; ({ ...<\/span><span style=\"color: #E06C75\">acc<\/span><span style=\"color: #ABB2BF\">, [<\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #ABB2BF\">]<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">acc<\/span><span style=\"color: #ABB2BF\">[<\/span><span style=\"color: #E06C75\">customer<\/span><span style=\"color: #ABB2BF\">] <\/span><span style=\"color: #56B6C2\">??<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">total<\/span><span style=\"color: #ABB2BF\"> }),<\/span>\n<span style=\"color: #ABB2BF\">  {}<\/span>\n<span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">byCustomer<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ { '\u0410\u043d\u043d\u0430': 4700, '\u0411\u043e\u0440\u0438\u0441': 800 }<\/span><\/code><\/pre>\n<p>\u0413\u0440\u0430\u043d\u0438\u0446\u0430: spread \u0432\u043d\u0443\u0442\u0440\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code> \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435, \u043d\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u0445 \u0442\u044b\u0441\u044f\u0447 \u043a\u043b\u044e\u0447\u0435\u0439 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code>: \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u044d\u0442\u0430 \u043c\u0443\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u0432\u0438\u0434\u043d\u0430. \u0414\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 Node.js 21+ \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Object.groupBy<\/code>.<\/p>\n<h2 id=\"s6\">\u0421\u0432\u043e\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code>, \u0435\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443. \u0412\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f &#8212; \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f: \u043e\u043d\u0430 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442, \u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">mapForEach<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">arr<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">result<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [];<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">for<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #C678DD\">let<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">&lt;<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">arr<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #56B6C2\">++<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">result<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">push<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">arr<\/span><span style=\"color: #ABB2BF\">[<\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\">], <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #ABB2BF\">  }<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">result<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">words<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [<\/span><span style=\"color: #98C379\">\"js\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"\u0444\u0443\u043d\u043a\u0446\u0438\u044f\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"map\"<\/span><span style=\"color: #ABB2BF\">];<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">mapForEach<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">words<\/span><span style=\"color: #ABB2BF\">, (<\/span><span style=\"color: #E06C75\">w<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">w<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ [ 2, 7, 3 ]<\/span>\n\n<span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">multiplier<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">factor<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">factor<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">double<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">multiplier<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">mapForEach<\/span><span style=\"color: #ABB2BF\">([<\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">3<\/span><span style=\"color: #ABB2BF\">], <\/span><span style=\"color: #C678DD\">double<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ [ 2, 4, 6 ]<\/span><\/code><\/pre>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">mapForEach<\/code> \u0435\u0441\u0442\u044c \u0446\u0438\u043a\u043b \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">push<\/code>, \u043d\u043e \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u043e\u043d\u0430 \u0447\u0438\u0441\u0442\u0430\u044f \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0447\u0438\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u0430\u044f <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">fn<\/code>: \u0441\u0430\u043c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">mapForEach<\/code> \u0432\u0445\u043e\u0434 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0422\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0424\u041f-\u0443\u0442\u0438\u043b\u0438\u0442 &#8212; \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430 \u0447\u0438\u0441\u0442\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<h2 id=\"s7\">\u0417\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f<\/h2>\n<p><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">multiplier(2)<\/code> \u0432\u0435\u0440\u043d\u0443\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043d\u0438\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">factor = 2<\/code>. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435. \u0415\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 &#8212; \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u0435\u0437 \u043a\u043b\u0430\u0441\u0441\u043e\u0432:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">createCounter<\/span><span style=\"color: #ABB2BF\">() {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">let<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">count<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">increment<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> () =&gt; <\/span><span style=\"color: #56B6C2\">++<\/span><span style=\"color: #E06C75\">count<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">value<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> () =&gt; <\/span><span style=\"color: #E06C75\">count<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">  };<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">c1<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">createCounter<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">c2<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">createCounter<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #E06C75\">c1<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">increment<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #E06C75\">c1<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">increment<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #E06C75\">c2<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">increment<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">c1<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">value<\/span><span style=\"color: #ABB2BF\">(), <\/span><span style=\"color: #E06C75\">c2<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">value<\/span><span style=\"color: #ABB2BF\">()); <\/span><span style=\"color: #7F848E\">\/\/ 2 1<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">c1<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">count<\/span><span style=\"color: #ABB2BF\">);               <\/span><span style=\"color: #7F848E\">\/\/ undefined - \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u044c<\/span><\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">createCounter<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">count<\/code>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0441\u0447\u0435\u0442\u0447\u0438\u043a &#8212; \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u0435\u043c, \u043d\u043e \u043d\u0435 \u0447\u0438\u0441\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">increment<\/code> \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0441 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f\u043c\u0438 &#8212; <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">var<\/code> \u0432 \u0446\u0438\u043a\u043b\u0435:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">fns<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [];<\/span>\n<span style=\"color: #C678DD\">for<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #C678DD\">var<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">&lt;<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">3<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #56B6C2\">++<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #E06C75\">fns<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">push<\/span><span style=\"color: #ABB2BF\">(() =&gt; <\/span><span style=\"color: #E06C75\">i<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">fns<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">map<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">f<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">f<\/span><span style=\"color: #ABB2BF\">())); <\/span><span style=\"color: #7F848E\">\/\/ [ 3, 3, 3 ]<\/span>\n\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">fixed<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> [];<\/span>\n<span style=\"color: #C678DD\">for<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #C678DD\">let<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">j<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">j<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">&lt;<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">3<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #E06C75\">j<\/span><span style=\"color: #56B6C2\">++<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #E06C75\">fixed<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">push<\/span><span style=\"color: #ABB2BF\">(() =&gt; <\/span><span style=\"color: #E06C75\">j<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">fixed<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">map<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">f<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">f<\/span><span style=\"color: #ABB2BF\">())); <\/span><span style=\"color: #7F848E\">\/\/ [ 0, 1, 2 ]<\/span><\/code><\/pre>\n<p>\u0423 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">var<\/code> \u043e\u0434\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0432\u0435\u0441\u044c \u0446\u0438\u043a\u043b, \u0438 \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0438\u0434\u044f\u0442 \u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">let<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<h2 id=\"s8\">\u041a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/h2>\n<p>\u042d\u0442\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0447\u0430\u0441\u0442\u043e \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u044e\u0442. <strong>\u041a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0445 \u0438\u0445 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443: <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">f(a, b, c)<\/code> -&gt; <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">f(a)(b)(c)<\/code>. <strong>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/strong> \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0447\u0430\u0441\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #7F848E\">\/\/ \u041a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e: \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0443 \u0437\u0430 \u0432\u044b\u0437\u043e\u0432<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">addTax<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">rate<\/span><span style=\"color: #ABB2BF\">) =&gt; (<\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E5C07B\">Math<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">round<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">price<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">rate<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">\/<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">100<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">withVat<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">addTax<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">20<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">withVat<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">1000<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ 1200<\/span>\n\n<span style=\"color: #7F848E\">\/\/ \u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 curry \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/span>\n<span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">curry<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">curried<\/span><span style=\"color: #ABB2BF\">(...<\/span><span style=\"color: #E06C75\">args<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">args<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">&gt;=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span>\n<span style=\"color: #ABB2BF\">      <\/span><span style=\"color: #56B6C2\">?<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">(...<\/span><span style=\"color: #E06C75\">args<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">      <\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> (...<\/span><span style=\"color: #E06C75\">more<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">curried<\/span><span style=\"color: #ABB2BF\">(...<\/span><span style=\"color: #E06C75\">args<\/span><span style=\"color: #ABB2BF\">, ...<\/span><span style=\"color: #E06C75\">more<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #ABB2BF\">  };<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">volume<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">c<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">c<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">cVolume<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">curry<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">volume<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">cVolume<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">)(<\/span><span style=\"color: #D19A66\">3<\/span><span style=\"color: #ABB2BF\">)(<\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\">), <\/span><span style=\"color: #E06C75\">cVolume<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">3<\/span><span style=\"color: #ABB2BF\">)(<\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\">), <\/span><span style=\"color: #E06C75\">cVolume<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">)(<\/span><span style=\"color: #D19A66\">3<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ 24 24 24<\/span>\n\n<span style=\"color: #7F848E\">\/\/ \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435: \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0447\u0430\u0441\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0440\u0430\u0437\u0443<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">greet<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">greeting<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #98C379\">`${<\/span><span style=\"color: #E06C75\">greeting<\/span><span style=\"color: #98C379\">}, ${<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #98C379\">}!`<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">hello<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">greet<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">bind<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E5C07B\">null<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"\u041f\u0440\u0438\u0432\u0435\u0442\"<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">hello<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"\u0410\u043d\u043d\u0430\"<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ \u041f\u0440\u0438\u0432\u0435\u0442, \u0410\u043d\u043d\u0430!<\/span>\n\n<span style=\"color: #7F848E\">\/\/ \u0413\u0440\u0430\u043d\u0438\u0446\u0430: fn.length \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 rest<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(((<\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">a<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">, ((...<\/span><span style=\"color: #E06C75\">xs<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">xs<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">); <\/span><span style=\"color: #7F848E\">\/\/ 1 0<\/span><\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">curry<\/code> \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">fn.length<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">...rest<\/code> \u043e\u043d \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u00ab\u043e\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u043d\u043e\u0435\u00bb \u043a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">curry<\/code> \u0432\u044b\u0448\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430 \u0432\u044b\u0437\u043e\u0432, \u043a\u0430\u043a \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 Ramda \u0438 Lodash.<\/p>\n<h2 id=\"s9\">\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f: pipe \u0438 compose<\/h2>\n<p>\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043e\u0434\u043d\u0443: \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0434\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0432\u0442\u043e\u0440\u043e\u0439. <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">pipe<\/code> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">compose<\/code> &#8212; \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e, \u043a\u0430\u043a \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">f(g(x))<\/code>.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">pipe<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (...<\/span><span style=\"color: #E06C75\">fns<\/span><span style=\"color: #ABB2BF\">) =&gt; (<\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">fns<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">reduce<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">acc<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">acc<\/span><span style=\"color: #ABB2BF\">), <\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">compose<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (...<\/span><span style=\"color: #E06C75\">fns<\/span><span style=\"color: #ABB2BF\">) =&gt; (<\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">fns<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">reduceRight<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #E06C75\">acc<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">fn<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">acc<\/span><span style=\"color: #ABB2BF\">), <\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">trim<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">trim<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">lower<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">toLowerCase<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">slugify<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">replace<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\/\\s+\/g<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"-\"<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">toSlug<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">pipe<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">trim<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">lower<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">slugify<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">toSlug2<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">compose<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">slugify<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">lower<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">trim<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">toSlug<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"  Functional Programming JS \"<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ functional-programming-js<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">toSlug2<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"  Functional Programming JS \"<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ functional-programming-js<\/span><\/code><\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u0436\u0434\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 &#8212; \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0435 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">|&gt;<\/code> \u0432 JavaScript \u043f\u043e\u043a\u0430 \u043d\u0435\u0442, \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u0430\u043a \u0447\u0442\u043e <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">pipe<\/code> \u043f\u0438\u0448\u0443\u0442 \u0441\u0430\u043c\u0438 \u0438\u043b\u0438 \u0431\u0435\u0440\u0443\u0442 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<h2 id=\"s10\">\u0413\u0434\u0435 \u0424\u041f \u0432 JavaScript \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0446\u0438\u043a\u043b\u043e\u0432 &#8212; \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430 \u0424\u041f, \u043d\u043e \u0432 JavaScript \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0441\u0442\u0435\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sumTo<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">n<\/span><span style=\"color: #ABB2BF\">) =&gt; (<\/span><span style=\"color: #E06C75\">n<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">===<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">?<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">n<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sumTo<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">n<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">sumTo<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">1000<\/span><span style=\"color: #ABB2BF\">)); <\/span><span style=\"color: #7F848E\">\/\/ 500500<\/span>\n<span style=\"color: #C678DD\">try<\/span><span style=\"color: #ABB2BF\"> {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">sumTo<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">1e6<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #ABB2BF\">} <\/span><span style=\"color: #C678DD\">catch<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">e<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">e<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\": \"<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">e<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">message<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #ABB2BF\">}<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">500500\nRangeError: Maximum call stack size exceeded\n<\/code><\/pre>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0435\u0441\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435, \u043d\u043e V8 (Node.js, Chrome) \u0435\u0435 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u0435\u043d \u0446\u0438\u043a\u043b \u0438\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code>. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">sumTo<\/code> \u0432\u044b\u0448\u0435 \u0438 \u043d\u0435 \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u0430\u044f: \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0435\u0449\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">n + ...<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0439 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f &#8212; \u0434\u043b\u044f \u043d\u0435\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">(n, acc = 0) =&gt; (n === 0 ? acc : sumTo(n - 1, acc + n))<\/code>, \u0438 \u044d\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0432\u0438\u0436\u043a\u0430\u0445 \u0441 TCO (Safari). \u0412\u0442\u043e\u0440\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 &#8212; \u0446\u0435\u043f\u043e\u0447\u043a\u0430 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">filter().map().reduce()<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b; \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043c\u0430\u0445 \u044d\u0442\u043e \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u043d\u0430 \u0433\u043e\u0440\u044f\u0447\u0435\u043c \u043f\u0443\u0442\u0438 \u0441 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0432 \u043e\u0434\u0438\u043d <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code> \u0438\u043b\u0438 \u0446\u0438\u043a\u043b.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0424\u041f-\u0441\u0442\u0438\u043b\u044c \u0443\u043c\u0435\u0441\u0442\u0435\u043d: \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043e\u0442\u0432\u0435\u0442\u044b API, \u043e\u0442\u0447\u0435\u0442\u044b, \u0444\u043e\u0440\u043c\u044b), \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 React \u0438 Redux, \u0433\u0434\u0435 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0438, \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442: \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 DOM, \u0433\u043e\u0440\u044f\u0447\u0438\u0435 \u0446\u0438\u043a\u043b\u044b, \u043a\u043e\u0434, \u0433\u0434\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043f\u0440\u0438\u0435\u043c\u043e\u0432, &#8212; \u0442\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0446\u0438\u043a\u043b \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0435. \u0422\u0435\u043e\u0440\u0438\u044e \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b \u0432 \u0446\u0435\u043b\u043e\u043c, \u0431\u0435\u0437 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a JavaScript, \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"\/journal\/funkcionalnaya-razrabotka-ot-a-do-ya\/\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u0410 \u0434\u043e \u042f<\/a>.<\/p>\n<h2 id=\"s11\">\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<ul>\n<li>\u0424\u041f \u0432 JavaScript &#8212; \u0441\u0442\u0438\u043b\u044c, \u0430 \u043d\u0435 \u0440\u0435\u0436\u0438\u043c \u044f\u0437\u044b\u043a\u0430: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f.<\/li>\n<li><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">const<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Object.freeze<\/code> \u043d\u0435 \u0434\u0430\u044e\u0442 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0439 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438; <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">sort<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reverse<\/code> \u043c\u0435\u043d\u044f\u044e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438 &#8212; <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">toSorted<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">toReversed<\/code>.<\/li>\n<li>\u0412 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435; \u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043b\u0438\u0448\u043d\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0432\u0440\u043e\u0434\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">parseInt<\/code>.<\/li>\n<li>\u041a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0443, \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 &#8212; \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u0442\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432; \u043e\u0431\u0430 \u043d\u0443\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">pipe<\/code>.<\/li>\n<li>\u0413\u043b\u0443\u0431\u043e\u043a\u0430\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0432 V8 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0435\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0446\u0438\u043a\u043b \u0438\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code>.<\/li>\n<\/ul>\n<h2 id=\"s12\">\u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \/ \u0441\u0432\u044f\u0437\u044c \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439<\/h2>\n<div class=\"oj-cta\" style=\"background:#fbf4e4;border-left:4px solid #c9962b;border-radius:8px;padding:16px 20px;margin:24px 0\">\n<p style=\"margin:0 0 8px\"><strong>\u041e\u0441\u0432\u043e\u0439\u0442\u0435 \u0442\u0435\u043c\u0443 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/strong><\/p>\n<p>\u041f\u0440\u0438\u0435\u043c\u044b \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434- \u0438 Node.js-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430: \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 API \u0447\u0435\u0440\u0435\u0437 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">reduce<\/code>, \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432 React \u0438 Redux, \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f middleware, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0432 \u0445\u0443\u043a\u0430\u0445 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043a\u0443\u0440\u0441\u0435 <a href=\"https:\/\/otus.ru\/lessons\/javascript-professional\/?int_article=funkcionalnoe-programmirovanie-v-javascript&amp;int_place=article&amp;int_variant=v1\">\u00abJavaScript-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c\u00bb<\/a>. \u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430 <a href=\"https:\/\/otus.ru\/events\/?int_article=funkcionalnoe-programmirovanie-v-javascript&amp;int_place=article&amp;int_variant=v1\">\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0443\u0440\u043e\u043a\u0430\u0445 Otus<\/a>.<\/p>\n<\/div>\n<h2 id=\"s13\">FAQ<\/h2>\n<p><strong>\u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f &#8212; \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435?<\/strong><br \/>\n\u041d\u0435\u0442, \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441. \u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0430 \u043e\u0431\u044b\u0447\u043d\u0430\u044f <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">function<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0438\u0441\u0442\u043e\u0439; \u0434\u043b\u044f \u0424\u041f \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u043d\u0435 \u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p><strong>\u0427\u0435\u043c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">forEach<\/code> \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code>?<\/strong><br \/>\n<code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">forEach<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. \u0415\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">map<\/code> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u0435\u043d <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">forEach<\/code> \u0438\u043b\u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b.<\/p>\n<p><strong>\u041d\u0443\u0436\u043d\u0430 \u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u0440\u043e\u0434\u0435 Ramda \u0438\u043b\u0438 Lodash\/fp?<\/strong><br \/>\n\u0414\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0435\u0442: \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0438 \u043f\u0430\u0440\u044b \u0441\u0432\u043e\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">pipe<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">curry<\/code> \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u043d\u0443\u0436\u043d\u044b \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u0424\u041f) \u0432 JavaScript &#8212; \u044d\u0442\u043e \u0441\u0442\u0438\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439: \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043d\u0430\u0440\u0443\u0436\u0438. JavaScript \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u043e\u043d \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0435\u043d\u043d\u044b\u0439: \u0424\u041f \u0437\u0434\u0435\u0441\u044c &#8212; \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u0435\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0437\u044b\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442, \u0430 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c. \u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0427\u0435\u0442\u044b\u0440\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u0442\u0430\u044e\u0442 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":5110,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[83],"class_list":["post-5109","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-polza","tag-javascript"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0424\u041f \u043d\u0430 JS \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, map, filter \u0438 reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f, \u043a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 pipe. \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"A. Pavlenko\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#article\",\"name\":\"\\u0424\\u0443\\u043d\\u043a\\u0446\\u0438\\u043e\\u043d\\u0430\\u043b\\u044c\\u043d\\u043e\\u0435 \\u043f\\u0440\\u043e\\u0433\\u0440\\u0430\\u043c\\u043c\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u0432 JavaScript | Otus\",\"headline\":\"\\u0424\\u0443\\u043d\\u043a\\u0446\\u0438\\u043e\\u043d\\u0430\\u043b\\u044c\\u043d\\u043e\\u0435 \\u043f\\u0440\\u043e\\u0433\\u0440\\u0430\\u043c\\u043c\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u0432 JavaScript: \\u0447\\u0438\\u0441\\u0442\\u044b\\u0435 \\u0444\\u0443\\u043d\\u043a\\u0446\\u0438\\u0438, map\\\/filter\\\/reduce, \\u0437\\u0430\\u043c\\u044b\\u043a\\u0430\\u043d\\u0438\\u044f \\u0438 \\u043a\\u043e\\u043c\\u043f\\u043e\\u0437\\u0438\\u0446\\u0438\\u044f\",\"author\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/oj-1080x720-45.png\",\"width\":1080,\"height\":720},\"datePublished\":\"2026-09-24T09:00:00+00:00\",\"dateModified\":\"2026-09-25T15:27:51+00:00\",\"inLanguage\":\"ru-RU\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#webpage\"},\"articleSection\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435, JavaScript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"position\":2,\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\",\"item\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#listItem\",\"name\":\"\\u0424\\u0443\\u043d\\u043a\\u0446\\u0438\\u043e\\u043d\\u0430\\u043b\\u044c\\u043d\\u043e\\u0435 \\u043f\\u0440\\u043e\\u0433\\u0440\\u0430\\u043c\\u043c\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u0432 JavaScript: \\u0447\\u0438\\u0441\\u0442\\u044b\\u0435 \\u0444\\u0443\\u043d\\u043a\\u0446\\u0438\\u0438, map\\\/filter\\\/reduce, \\u0437\\u0430\\u043c\\u044b\\u043a\\u0430\\u043d\\u0438\\u044f \\u0438 \\u043a\\u043e\\u043c\\u043f\\u043e\\u0437\\u0438\\u0446\\u0438\\u044f\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#listItem\",\"position\":3,\"name\":\"\\u0424\\u0443\\u043d\\u043a\\u0446\\u0438\\u043e\\u043d\\u0430\\u043b\\u044c\\u043d\\u043e\\u0435 \\u043f\\u0440\\u043e\\u0433\\u0440\\u0430\\u043c\\u043c\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u0432 JavaScript: \\u0447\\u0438\\u0441\\u0442\\u044b\\u0435 \\u0444\\u0443\\u043d\\u043a\\u0446\\u0438\\u0438, map\\\/filter\\\/reduce, \\u0437\\u0430\\u043c\\u044b\\u043a\\u0430\\u043d\\u0438\\u044f \\u0438 \\u043a\\u043e\\u043c\\u043f\\u043e\\u0437\\u0438\\u0446\\u0438\\u044f\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\",\"name\":\"\\u041e\\u0442\\u0443\\u0441 \\u043e\\u043d\\u043b\\u0430\\u0439\\u043d-\\u043e\\u0431\\u0440\\u0430\\u0437\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435\",\"description\":\"\\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"telephone\":\"+74999389202\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/OTUS-journal-logo-180x180-1.png\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#organizationLogo\",\"width\":180,\"height\":180},\"image\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCetgtvy93o3i3CvyGXKFU3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/\",\"name\":\"A. Pavlenko\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13488c7d5b657aaaf1808afd398f71e0225df07dd94eb7e5fcdfc45feff43cb5?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"A. Pavlenko\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#webpage\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/\",\"name\":\"\\u0424\\u0443\\u043d\\u043a\\u0446\\u0438\\u043e\\u043d\\u0430\\u043b\\u044c\\u043d\\u043e\\u0435 \\u043f\\u0440\\u043e\\u0433\\u0440\\u0430\\u043c\\u043c\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u0432 JavaScript | Otus\",\"description\":\"\\u0424\\u041f \\u043d\\u0430 JS \\u0441 \\u043f\\u0440\\u0438\\u043c\\u0435\\u0440\\u0430\\u043c\\u0438 \\u043a\\u043e\\u0434\\u0430: \\u0447\\u0438\\u0441\\u0442\\u044b\\u0435 \\u0444\\u0443\\u043d\\u043a\\u0446\\u0438\\u0438, \\u0438\\u043c\\u043c\\u0443\\u0442\\u0430\\u0431\\u0435\\u043b\\u044c\\u043d\\u043e\\u0441\\u0442\\u044c, map, filter \\u0438 reduce, \\u0437\\u0430\\u043c\\u044b\\u043a\\u0430\\u043d\\u0438\\u044f, \\u043a\\u0430\\u0440\\u0440\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u0438 \\u043a\\u043e\\u043c\\u043f\\u043e\\u0437\\u0438\\u0446\\u0438\\u044f \\u0447\\u0435\\u0440\\u0435\\u0437 pipe. \\u0422\\u0438\\u043f\\u0438\\u0447\\u043d\\u044b\\u0435 \\u043e\\u0448\\u0438\\u0431\\u043a\\u0438 \\u0438 \\u0438\\u0445 \\u0438\\u0441\\u043f\\u0440\\u0430\\u0432\\u043b\\u0435\\u043d\\u0438\\u0435.\",\"inLanguage\":\"ru-RU\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/oj-1080x720-45.png\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#mainImage\",\"width\":1080,\"height\":720},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/funkcionalnoe-programmirovanie-v-javascript\\\/#mainImage\"},\"datePublished\":\"2026-09-24T09:00:00+00:00\",\"dateModified\":\"2026-09-25T15:27:51+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#website\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"name\":\"OTUS \\u0416\\u0443\\u0440\\u043d\\u0430\\u043b - \\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"alternateName\":\"OTUS \\u0416\\u0443\\u0440\\u043d\\u0430\\u043b\",\"description\":\"\\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"inLanguage\":\"ru-RU\",\"publisher\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript | Otus","description":"\u0424\u041f \u043d\u0430 JS \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, map, filter \u0438 reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f, \u043a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 pipe. \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.","canonical_url":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#article","name":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript | Otus","headline":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, map\/filter\/reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f","author":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"publisher":{"@id":"https:\/\/otus.ru\/journal\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2022\/11\/oj-1080x720-45.png","width":1080,"height":720},"datePublished":"2026-09-24T09:00:00+00:00","dateModified":"2026-09-25T15:27:51+00:00","inLanguage":"ru-RU","mainEntityOfPage":{"@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#webpage"},"isPartOf":{"@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#webpage"},"articleSection":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435, JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/#listItem","position":1,"name":"Home","item":"https:\/\/otus.ru\/journal\/","nextItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435"}},{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","position":2,"name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435","item":"https:\/\/otus.ru\/journal\/category\/polza\/","nextItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#listItem","name":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, map\/filter\/reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f"},"previousItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#listItem","position":3,"name":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, map\/filter\/reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f","previousItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435"}}]},{"@type":"Organization","@id":"https:\/\/otus.ru\/journal\/#organization","name":"\u041e\u0442\u0443\u0441 \u043e\u043d\u043b\u0430\u0439\u043d-\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","url":"https:\/\/otus.ru\/journal\/","telephone":"+74999389202","logo":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2026\/04\/OTUS-journal-logo-180x180-1.png","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#organizationLogo","width":180,"height":180},"image":{"@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#organizationLogo"},"sameAs":["https:\/\/www.youtube.com\/channel\/UCetgtvy93o3i3CvyGXKFU3g"]},{"@type":"Person","@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author","url":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/","name":"A. Pavlenko","image":{"@type":"ImageObject","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/13488c7d5b657aaaf1808afd398f71e0225df07dd94eb7e5fcdfc45feff43cb5?s=96&d=mm&r=g","width":96,"height":96,"caption":"A. Pavlenko"}},{"@type":"WebPage","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#webpage","url":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/","name":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript | Otus","description":"\u0424\u041f \u043d\u0430 JS \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, map, filter \u0438 reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f, \u043a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 pipe. \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.","inLanguage":"ru-RU","isPartOf":{"@id":"https:\/\/otus.ru\/journal\/#website"},"breadcrumb":{"@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#breadcrumblist"},"author":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"creator":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2022\/11\/oj-1080x720-45.png","@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#mainImage","width":1080,"height":720},"primaryImageOfPage":{"@id":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/#mainImage"},"datePublished":"2026-09-24T09:00:00+00:00","dateModified":"2026-09-25T15:27:51+00:00"},{"@type":"WebSite","@id":"https:\/\/otus.ru\/journal\/#website","url":"https:\/\/otus.ru\/journal\/","name":"OTUS \u0416\u0443\u0440\u043d\u0430\u043b - \u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","alternateName":"OTUS \u0416\u0443\u0440\u043d\u0430\u043b","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","inLanguage":"ru-RU","publisher":{"@id":"https:\/\/otus.ru\/journal\/#organization"}}]}},"aioseo_meta_data":{"post_id":"5109","title":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript | Otus","description":"\u0424\u041f \u043d\u0430 JS \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, map, filter \u0438 reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f, \u043a\u0430\u0440\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 pipe. \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.","keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-11-29 18:51:56","updated":"2026-09-25 17:49:49","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/otus.ru\/journal\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/otus.ru\/journal\/category\/polza\/\" title=\"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435\">\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, map\/filter\/reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/otus.ru\/journal\/"},{"label":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435","link":"https:\/\/otus.ru\/journal\/category\/polza\/"},{"label":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 JavaScript: \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, map\/filter\/reduce, \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f","link":"https:\/\/otus.ru\/journal\/funkcionalnoe-programmirovanie-v-javascript\/"}],"_links":{"self":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/5109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/comments?post=5109"}],"version-history":[{"count":3,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/5109\/revisions"}],"predecessor-version":[{"id":12915,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/5109\/revisions\/12915"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media\/5110"}],"wp:attachment":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media?parent=5109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/categories?post=5109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/tags?post=5109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}