{"id":133292,"date":"2025-01-18T22:07:57","date_gmt":"2025-01-18T16:07:57","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=133292"},"modified":"2025-01-18T22:07:57","modified_gmt":"2025-01-18T16:07:57","slug":"%d0%bf%d0%be%d1%80%d0%b0%d0%b7%d1%80%d1%8f%d0%b4%d0%bd%d1%8b%d0%b5-%d0%be%d0%bf%d0%b5%d1%80%d0%b0%d1%86%d0%b8%d0%b8-javascript","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=133292","title":{"rendered":"\u041f\u043e\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 JavaScript"},"content":{"rendered":"<p>\u0412 JavaScript \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0445 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u042d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">&amp;<\/span><span style=\"color: #66cc66;\">)<\/span>, \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418\u041b\u0418 <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">|<\/span><span style=\"color: #66cc66;\">)<\/span>, \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u0418\u041b\u0418 <span style=\"color: #66cc66;\">(<\/span>^<span style=\"color: #66cc66;\">)<\/span> \u0438 \u041d\u0415 <span style=\"color: #66cc66;\">(<\/span>~<span style=\"color: #66cc66;\">)<\/span>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p><strong>\u041f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">&amp;<\/span><span style=\"color: #66cc66;\">)<\/span><\/strong><br \/>\n\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0418 \u043d\u0430\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0431\u0438\u0442\u043e\u043c \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0431\u0438\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432 \u043e\u0431\u043e\u0438\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2025\/01\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2025-01-18-22-07-18.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-133293\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2025\/01\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2025-01-18-22-07-18.png\" alt=\"\" width=\"399\" height=\"110\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2025\/01\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2025-01-18-22-07-18.png 399w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2025\/01\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2025-01-18-22-07-18-200x55.png 200w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/a><\/p>\n<blockquote><p>let a = <span style=\"color: #cc66cc;\">13<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1101<\/span><br \/>\nlet b = <span style=\"color: #cc66cc;\">9<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1001<\/span><br \/>\nlet result = a <span style=\"color: #66cc66;\">&amp;<\/span> b; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430: 1001<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span>result<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: 9<\/span><\/p><\/blockquote>\n<p><strong>\u041f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418\u041b\u0418 <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">|<\/span><span style=\"color: #66cc66;\">)<\/span><\/strong><br \/>\n\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0418\u041b\u0418 \u043d\u0430\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0431\u0438\u0442\u043e\u043c \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432\u0441\u0435 \u0431\u0438\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<blockquote><p>let a = <span style=\"color: #cc66cc;\">13<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1101<\/span><br \/>\nlet b = <span style=\"color: #cc66cc;\">9<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1001<\/span><br \/>\nlet result = a <span style=\"color: #66cc66;\">|<\/span> b; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430: 1101<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span>result<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: 13<\/span><\/p><\/blockquote>\n<p><strong>\u0418\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u0418\u041b\u0418 <span style=\"color: #66cc66;\">(<\/span>^<span style=\"color: #66cc66;\">)<\/span><\/strong><br \/>\n\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e XOR \u043d\u0430\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0431\u0438\u0442\u043e\u043c \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0431\u0438\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<blockquote><p>let a = <span style=\"color: #cc66cc;\">13<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1101<\/span><br \/>\nlet b = <span style=\"color: #cc66cc;\">9<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1001<\/span><br \/>\nlet result = a ^ b; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430: 0100<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span>result<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: 4<\/span><\/p><\/blockquote>\n<p><strong>\u041f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u041d\u0415 <span style=\"color: #66cc66;\">(<\/span>~<span style=\"color: #66cc66;\">)<\/span><\/strong><br \/>\n\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0438\u0442 \u0447\u0438\u0441\u043b\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0443\u043b\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438, \u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u2014 \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<blockquote><p>let a = <span style=\"color: #cc66cc;\">13<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: 1101<\/span><br \/>\nlet result = ~a; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0414\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430: 0010<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span>result<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: -14<\/span><\/p><\/blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/strong><br \/>\n\u042d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 \u0431\u0438\u0442\u0430\u043c\u0438:<\/p>\n<p>\u041c\u0430\u0441\u043a\u0438 \u0438 \u0444\u043b\u0430\u0433\u0438: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u0441\u0431\u0440\u043e\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<blockquote><p><span style=\"color: #006600;\">let<\/span> flags = 0b1010; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0424\u043b\u0430\u0433\u0438<\/span><br \/>\nlet mask = 0b0010; <span style=\"color: #808080; font-style: italic;\">\/\/ \u041c\u0430\u0441\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0438\u0442\u0430<\/span><\/p>\n<p><span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">(<\/span>flags <span style=\"color: #66cc66;\">&amp;<\/span> mask<span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">!<\/span>== <span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">&#8216;\u0412\u0442\u043e\u0440\u043e\u0439 \u0431\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.&#8217;<\/span><span style=\"color: #66cc66;\">)<\/span>;<br \/>\n<span style=\"color: #66cc66;\">}<\/span> <span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #66cc66;\">{<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">&#8216;\u0412\u0442\u043e\u0440\u043e\u0439 \u0431\u0438\u0442 \u0441\u0431\u0440\u043e\u0448\u0435\u043d.&#8217;<\/span><span style=\"color: #66cc66;\">)<\/span>;<br \/>\n<span style=\"color: #66cc66;\">}<\/span><\/p><\/blockquote>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438: \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0431\u0438\u0442\u0430 \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u0447\u0435\u0442\u043d\u043e\u0441\u0442\u044c.<\/strong><\/p>\n<blockquote><p><span style=\"color: #000000; font-weight: bold;\">function<\/span> isEven<span style=\"color: #66cc66;\">(<\/span>n<span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span><br \/>\n<span style=\"color: #b1b100;\">return<\/span> <span style=\"color: #66cc66;\">(<\/span>n <span style=\"color: #66cc66;\">&amp;<\/span> <span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span> === <span style=\"color: #cc66cc;\">0<\/span>;<br \/>\n<span style=\"color: #66cc66;\">}<\/span><\/p>\n<p>console.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span>isEven<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ true<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span>isEven<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ false<\/span><\/p><\/blockquote>\n<p><strong>\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0438\u0442\u043e\u0432: \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0447\u0438\u0441\u043b\u0430.<\/strong><\/p>\n<blockquote><p><span style=\"color: #006600;\">let<\/span> rgbColor = 0xFF6633; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0426\u0432\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 #FF6633<\/span><br \/>\nlet red = <span style=\"color: #66cc66;\">(<\/span>rgbColor <span style=\"color: #66cc66;\">&gt;&gt;<\/span> <span style=\"color: #cc66cc;\">16<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">&amp;<\/span> 0xFF; <span style=\"color: #808080; font-style: italic;\">\/\/ \u041a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/span><br \/>\nlet green = <span style=\"color: #66cc66;\">(<\/span>rgbColor <span style=\"color: #66cc66;\">&gt;&gt;<\/span> <span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">&amp;<\/span> 0xFF; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0417\u0435\u043b\u0435\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/span><br \/>\nlet blue = rgbColor <span style=\"color: #66cc66;\">&amp;<\/span> 0xFF; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0421\u0438\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/span><br \/>\nconsole.<span style=\"color: #0066cc;\">log<\/span><span style=\"color: #66cc66;\">(<\/span>`\u041a\u0440\u0430\u0441\u043d\u044b\u0439: $<span style=\"color: #66cc66;\">{<\/span>red<span style=\"color: #66cc66;\">}<\/span>, \u0437\u0435\u043b\u0435\u043d\u044b\u0439: $<span style=\"color: #66cc66;\">{<\/span>green<span style=\"color: #66cc66;\">}<\/span>, \u0441\u0438\u043d\u0438\u0439: $<span style=\"color: #66cc66;\">{<\/span>blue<span style=\"color: #66cc66;\">}<\/span>`<span style=\"color: #66cc66;\">)<\/span>;<\/p><\/blockquote>\n<p>\u041f\u043e\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u043e\u0449\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0438\u0442\u0430\u043c\u0438 \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 JavaScript \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0445 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u042d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 (&amp;), \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418\u041b\u0418 (|), \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u0418\u041b\u0418 (^) \u0438 \u041d\u0415 (~). \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u041f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 (&amp;) \u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0418 \u043d\u0430\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0431\u0438\u0442\u043e\u043c \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":133293,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[463],"tags":[],"class_list":["post-133292","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"views":331,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/133292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133292"}],"version-history":[{"count":1,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/133292\/revisions"}],"predecessor-version":[{"id":133294,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/133292\/revisions\/133294"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/133293"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133292"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}