[{"data":1,"prerenderedAt":1537},["ShallowReactive",2],{"$fKNCHAK19eyga2uXRx3UnuNiIfKEbOfkpZiAGq8oTVn8":3,"$fMMUdSFktwQFqMVGPrTtt3EC5yheBp7PzwIqznamFcMo":100,"$fc0LoAJgqXDLbKKd2JS_NpM4SuzBK8EycUXINSg09CKU":103,"$fM3ea55k6lKMPOTM84llDB26VSQDVVbxiQuSBFQw9P_c":108,"$f1Prj1xEczHja_-L7FyIGgRHd5_cSWHo7r6AE5aheAik":453,"$fI5fDmvm-5tr9wcH0eHaKZa1j3y_FQIQaHHPqbZxAHJE":675,"mdc-kle0em-key":695,"mdc-2dmxub-key":707,"mdc-6pxngk-key":725,"mdc-r72i70-key":742,"mdc-9a855a-key":759,"mdc-bmpdvt-key":773,"mdc--4zebrx-key":806,"mdc--tyjtt2-key":828,"mdc--reylfw-key":857,"mdc--n5tj83-key":886,"mdc--h8o9p-key":933,"mdc--j03h0j-key":1052,"mdc--95od0s-key":1088,"mdc--yj3olp-key":1137,"mdc-cdd43l-key":1236,"mdc-5e4jwz-key":1457,"mdc--r1v0la-key":1487,"mdc-rl5ekk-key":1500},{"content":4,"quizQuestionContent":71,"type":90,"pageMeta":91},[5,9,13,16,20,24,27,31,34,37,41,44,48,51,55,58,61,65,68],{"id":6,"value":7,"isTypeH1":8},"1931","typeof и необъявленная переменная в JavaScript",true,{"id":10,"value":11,"anchor":12,"isTypeH2":8},"4460","Теория по задаче","theory-on-the-task",{"id":14,"value":15,"isTypeParagraph":8},"10258","Оператор `typeof` является унарным оператором JavaScript, который возвращает строку с типом значения. Особенность `typeof` состоит в том, что он умеет безопасно обрабатывать обращение к идентификатору, которого не существует в текущей области видимости: вместо выброса исключения возвращается строка `undefined`.",{"id":17,"description":18,"titleAlert":19,"isTypeAlertInfo":8},"670","Строка `undefined` — это результат `typeof`, а не само значение переменной; то есть возвращается именно текст `undefined`.",null,{"id":21,"value":22,"anchor":23,"isTypeH3":8},"4480","Почему ошибки нет: ключевая особенность typeof","why-there-is-no-error-the-key-feature-of-typeof",{"id":25,"value":26,"isTypeParagraph":8},"10259","В обычном выражении обращение к необъявленной переменной вызывает `ReferenceError`, потому что движок пытается получить значение по имени, но не находит привязку (binding) в окружениях выполнения.\n\nУ `typeof` сделано исключение: при проверке идентификатора, который невозможно разрешить (unresolvable reference), результатом становится строка `undefined`, а исключение не выбрасывается. Это исторически и спецификационно закреплённое поведение, чтобы можно было проверять наличие глобальных переменных (например, API окружения) без риска падения программы.\n\n```\n// Необъявленная переменная (не существует нигде)\ntypeof notDeclared;           // \"undefined\"\n\n// То же самое, но обычное чтение значения:\nnotDeclared;                  // ReferenceError: notDeclared is not defined\n```",{"id":28,"value":29,"anchor":30,"isTypeH3":8},"4481","Важное отличие: \"необъявлена\" и \"в TDZ\"","important-difference-undeclared-vs-tdz",{"id":32,"value":33,"isTypeParagraph":8},"10260","Термины часто путаются, но ситуации разные:\n\n- Необъявленная переменная: идентификатор вообще не был объявлен через `var`, `let`, `const`, `function`, `class`, `import` в доступных областях видимости\n- Объявленная, но недоступная из-за TDZ (temporal dead zone): переменная объявлена через `let`/`const`/`class`, но обращение происходит до выполнения строки инициализации\n\nДля TDZ исключение из правила `typeof` не применяется: при обращении к переменной в TDZ будет выброшен `ReferenceError`, даже если используется `typeof`.\n\n```\n// Пример TDZ\n{\n  // Переменная объявлена ниже, но сейчас она в TDZ\n  typeof tdzVar;              // ReferenceError: Cannot access 'tdzVar' before initialization\n  let tdzVar = 1;\n}\n```\n",{"id":35,"description":36,"titleAlert":19,"isTypeAlertWarning":8},"729","Если планируется \"безопасная проверка существования\" через `typeof`, важно, чтобы проверяемое имя не было объявлено как `let`/`const` в той же области ниже по коду, иначе возможен `ReferenceError` из-за TDZ.",{"id":38,"value":39,"anchor":40,"isTypeH3":8},"4482","Как работает typeof на практике","how-typeof-works-in-practice",{"id":42,"value":43,"isTypeParagraph":8},"10261","`typeof` всегда возвращает строку. Самые типичные результаты:\n\n```\ntypeof undefined;             // \"undefined\"\ntypeof null;                  // \"object\"        // историческая особенность языка\ntypeof 123;                   // \"number\"\ntypeof 10n;                   // \"bigint\"\ntypeof \"txt\";                 // \"string\"\ntypeof true;                  // \"boolean\"\ntypeof Symbol(\"s\");           // \"symbol\"\ntypeof function(){};          // \"function\"\ntypeof {};                    // \"object\"\n```\n\nОтсюда видно, почему вариант “вернётся `null`” неверен: `typeof` не возвращает `null` ни в каком случае; он возвращает только строку.",{"id":45,"value":46,"anchor":47,"isTypeH3":8},"4483","Разбор вариантов из задания","analysis-of-the-options-in-the-task",{"id":49,"value":50,"isTypeParagraph":8},"10262","- Будет выброшен `ReferenceError`, потому что переменная не объявлена — неверно для `typeof` и необъявленной переменной; верно для обычного чтения значения `x`\n- Вернётся строка `undefined` и ошибки не будет — верно (для действительно необъявленной переменной)\n- Вернётся `null`, так как переменная отсутствует — неверно, `typeof` возвращает строку, а не `null`\n- Вернётся строка `not defined` — неверно; такой строки `typeof` не возвращает (сообщение об ошибке `is not defined` относится к `ReferenceError` при обычном доступе)",{"id":52,"value":53,"anchor":54,"isTypeH3":8},"4484","Таблица: что будет в разных случаях","table-what-happens-in-different-cases",{"id":56,"value":57,"isTypeParagraph":8},"10263","| Ситуация | Пример | Результат |\n|---|---|---|\n| Имя не объявлено нигде | `typeof noSuchName` | `\"undefined\"` |\n| Обычное чтение несуществующего имени | `noSuchName` | `ReferenceError` |\n| `var` объявлена, но ещё `undefined` | `var a; typeof a` | `\"undefined\"` |\n| `let/const` в TDZ | `{ typeof b; let b = 1; }` | `ReferenceError` |\n| Объект и отсутствующее свойство | `typeof obj.missing` | `\"undefined\"` (если `obj` определён) |\n| Сам объект не определён | `typeof obj.missing` | `ReferenceError` (потому что сначала нужно прочитать `obj`) |",{"id":59,"description":60,"titleAlert":19,"isTypeAlertInfo":8},"671","Проверка `typeof obj.missing` безопасна только при гарантированно существующем `obj`. Если `obj` не объявлен, ошибка возникнет ещё до доступа к свойству.",{"id":62,"value":63,"anchor":64,"isTypeH3":8},"4485","Наглядная схема рассуждения","a-visual-reasoning-scheme",{"id":66,"value":67,"isTypeParagraph":8},"10264","```\nШаг 1: Это typeof Identifier?\n  ├─ Да → Шаг 2\n  └─ Нет → обычные правила вычисления выражений\n\nШаг 2: Идентификатор существует в области видимости?\n  ├─ Нет (unresolvable) → результат \"undefined\", без ошибки\n  └─ Да → Шаг 3\n\nШаг 3: Идентификатор в TDZ?\n  ├─ Да → ReferenceError\n  └─ Нет → вернуть строку типа значения\n```",{"id":69,"value":70,"isTypeParagraph":8},"10265","Итого: при `typeof` на действительно необъявленной переменной возвращается строка `undefined` без ошибки; `ReferenceError` появляется при обычном обращении к имени или при `typeof` к переменной в TDZ.",{"id":72,"options":73,"hint":87,"solution":88,"description":89},"1160",[74,78,81,84],{"id":75,"label":76,"isCorrect":77},"4784","Будет выброшен `ReferenceError`, потому что переменная не объявлена ",false,{"id":79,"label":80,"isCorrect":8},"4785","Вернётся строка `undefined` и ошибки не будет  ",{"id":82,"label":83,"isCorrect":77},"4786","Вернётся `null`, так как переменная отсутствует",{"id":85,"label":86,"isCorrect":77},"4787","Вернётся строка `\"not defined\"`","Следует вспомнить, что `typeof` — особый оператор, который умеет проверять несуществующие идентификаторы без исключения, но не спасает от TDZ у `let`/`const`.","**Правильный вариант: 2** - вернётся строка ` \"undefined\" ` и ошибки не будет ","Что будет, если вызвать typeof на необъявленной переменной?","quizQuestion",{"title":89,"description":92,"ogTitle":7,"ogDescription":92,"ogImageUrl":93,"canonical":19,"ogLocale":94,"ogSiteName":95,"ogImageType":96,"ogImageWidth":97,"ogImageHeight":98,"ogType":99,"ogUrl":19},"Разбор поведения typeof с необъявленной переменной и отличий от TDZ для let/const, с примерами и типовыми ошибками.","/og-image.png","ru_RU","goodwebjob.ru","image_jpeg","1200","630","article",{"siteName":101,"siteUrl":102},"GOOD WEB JOB!","https://goodwebjob.ru",[104],{"label":105,"slug":106,"to":107},"Подготовка к тех.интервью","technical-interview","/technical-interview/where-to-begin",{"navigationList":109,"navigationSublist":117},[110,113],{"path":107,"isActive":77,"name":111,"icon":112,"isNavbarMobileDisabled":8},"С чего начать?","material-symbols:visibility-outline-rounded",{"path":114,"isActive":8,"name":115,"icon":116,"isNavbarMobileDisabled":77},"/technical-interview/tasks","Сборник задач","material-symbols:task-outline",[118,127,154,166,172,312,336,345,351,414,435,441],{"title":119,"list":120,"isOpened":77},"Bash",[121,124],{"name":122,"path":123,"isActive":77},"Дан фрагмент bash-скрипта: cd ~; mkdir foo... Что в нем происходит?","/technical-interview/tasks/here-is-a-fragment-of-a-bash-script-cd-mkdir-foo-what-is-happening-in-this-script",{"name":125,"path":126,"isActive":77},"Дан фрагмент bash-скрипта: target=$(ps -Af | grep $1 | head -n 1)...","/technical-interview/tasks/here-is-a-fragment-of-a-bash-script-target-ps-af-grep-1-head-n-1",{"title":128,"list":129,"isOpened":77},"CSS",[130,133,136,139,142,145,148,151],{"name":131,"path":132,"isActive":77},"Дан HTML-код. Какой будет цвет у текста «Some dummy text»?","/technical-interview/tasks/the-html-code-is-given-what-will-be-the-color-of-the-some-dummy-text",{"name":134,"path":135,"isActive":77},"Есть шаблон HTML и CSS кода. Какой будет цвет у текста «Таким образом, постоянное»?","/technical-interview/tasks/there-is-a-template-for-html-and-css-code-what-color-will-the-text-thus-constant-have",{"name":137,"path":138,"isActive":77},"Есть шаблон вложенного HTML кода. Какой будет цвет у текста «One more dummy text»?","/technical-interview/tasks/there-is-a-template-for-embedded-html-code-what-will-be-the-color-of-the-one-more-dummy-text",{"name":140,"path":141,"isActive":77},"Есть шаблон вложенного HTML кода. Будет ли display:block у body влиять на span?","/technical-interview/tasks/there-is-a-template-for-embedded-html-code-will-there-be-a-display-does-bodys-block-affect-span",{"name":143,"path":144,"isActive":77},"Есть HTML код. Будет ли font-weight на span влиять?","/technical-interview/tasks/there-is-an-html-code-will-font-weight-affect-span",{"name":146,"path":147,"isActive":77},"Flexbox и Grid, чем отличаются друг от друга?","/technical-interview/tasks/what-are-the-differences-between-flexbox-and-grid",{"name":149,"path":150,"isActive":77},"Заменяют ли Flexbox и Grid друг друга?","/technical-interview/tasks/do-flexbox-and-grid-replace-each-other",{"name":152,"path":153,"isActive":77},"Есть CSS и JS анимация. Какая между ними разница, что быстрее, что более удобно?","/technical-interview/tasks/there-are-css-and-js-animations-what-is-the-difference-between-them-and-which-is-faster-and-more-convenient",{"title":155,"list":156,"isOpened":77},"Git",[157,160,163],{"name":158,"path":159,"isActive":77},"Разрабатывал, взял закоммитил, запушил. Оказалось, что запушил не в ту ветку, точнее, коммит не в ту ветку. Какие действия?","/technical-interview/tasks/developed-it-committed-it-and-launched-it-it-turned-out-that-i-had-pushed-it-to-the-wrong-branch-or-rather-the-commit-was-in-the-wrong-branch-what-actions",{"name":161,"path":162,"isActive":77},"В git есть несколько вариантов слияния веток, какие? Чем отличаются?","/technical-interview/tasks/git-has-several-options-for-merging-branches-which-ones-how-are-they-different",{"name":164,"path":165,"isActive":77},"Какие существуют стратегии ветвления для работы команды? Что это такое?","/technical-interview/tasks/what-are-the-branching-strategies-for-the-team-what-is-it",{"title":167,"list":168,"isOpened":77},"HTML",[169],{"name":170,"path":171,"isActive":77},"Что такое HTML?","/technical-interview/tasks/what-is-html",{"title":173,"list":174,"isOpened":77},"JavaScript",[175,178,181,184,187,190,193,196,199,202,205,208,211,214,217,220,223,226,228,231,234,237,240,243,246,249,252,255,258,261,264,267,270,273,276,279,282,285,288,291,294,297,300,303,306,309],{"name":176,"path":177,"isActive":77},"Какие логические значения в console.log будут получены?","/technical-interview/tasks/prototype-what-logical-values-will-be-received-in-console-log",{"name":179,"path":180,"isActive":77},"Почему опасно писать прямо в прототипы базовых типов?","/technical-interview/tasks/why-is-it-dangerous-to-write-directly-to-the-prototypes-of-basic-types",{"name":182,"path":183,"isActive":77},"Что вернёт следующий код? Object.create(null).hasOwnProperty('toString')","/technical-interview/tasks/what-will-the-following-code-return-object-create-null-has-own-property-to-string",{"name":185,"path":186,"isActive":77},"Какое значение выведет консоль с object.property?","/technical-interview/tasks/what-value-will-the-console-output-with-object-property",{"name":188,"path":189,"isActive":77},"Что выведется в console.log([arr[0](), arr[0]()])?","/technical-interview/tasks/what-will-be-displayed-in-console-log-arr-0-arr-0",{"name":191,"path":192,"isActive":77},"Что выведет console.log в результате выполнения цикла while?","/technical-interview/tasks/what-will-console-log-output-as-a-result-of-executing-the-while-loop",{"name":194,"path":195,"isActive":77},"Есть функция и объект. Напишите все известные вам способы, чтобы вывести в консоли значение x из объекта, используя функцию","/technical-interview/tasks/there-is-a-function-and-an-object-write-all-the-ways-you-know-to-output-the-value-of-x-from-an-object-in-the-console-using-the-function",{"name":197,"path":198,"isActive":77},"Что вернёт метод book.getUpperName()?","/technical-interview/tasks/what-will-the-book-get-upper-name-method-return",{"name":200,"path":201,"isActive":77},"Переменные объявлены следующим образом: a=3; b=«hello»;. Укажите правильное утверждение","/technical-interview/tasks/variables-are-declared-as-follows-specify-the-correct-statement",{"name":203,"path":204,"isActive":77},"Что выведет консоль в случае присвоения свойства массиву по строковому положительному индексу?","/technical-interview/tasks/what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-positive-string-index",{"name":206,"path":207,"isActive":77},"Что выведет консоль в случае присвоения свойства массиву по строковому отрицательному индексу?","/technical-interview/tasks/what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-negative-string-index",{"name":209,"path":210,"isActive":77},"Что выведет консоль в случае удаления элемента массива с помощью оператора delete?","/technical-interview/tasks/what-will-the-console-output-if-an-array-element-is-deleted-using-the-delete-operator",{"name":212,"path":213,"isActive":77},"Что вернёт этот код: typeof (function(){})()","/technical-interview/tasks/what-this-code-will-return-typeof-function",{"name":215,"path":216,"isActive":77},"Что получится в результате передачи объекта как аргумента в функцию и выполнения кода?","/technical-interview/tasks/what-will-happen-when-an-object-is-passed-as-an-argument-to-a-function-and-the-code-is-executed",{"name":218,"path":219,"isActive":77},"Какие способы объявления функции есть в JavaScript?","/technical-interview/tasks/what-are-the-ways-to-declare-a-function-in-javascript",{"name":221,"path":222,"isActive":77},"Что такое this в JavaScript?","/technical-interview/tasks/what-is-this-in-javascript",{"name":224,"path":225,"isActive":77},"Что такое Event Loop, как работает?","/technical-interview/tasks/what-is-an-event-loop-and-how-does-it-work",{"name":89,"path":227,"isActive":77},"/technical-interview/tasks/what-happens-if-you-call-typeof-on-an-undeclared-variable",{"name":229,"path":230,"isActive":77},"Что показывает оператор typeof в JavaScript?","/technical-interview/tasks/what-does-the-typeof-operator-show-in-javascript",{"name":232,"path":233,"isActive":77},"Какие типы данных существует в JavaScript?","/technical-interview/tasks/what-types-of-data-exist-in-javascript",{"name":235,"path":236,"isActive":77},"Какую структуру использовать для хранения упорядоченного списка строк в JavaScript?","/technical-interview/tasks/what-is-the-best-structure-to-use-for-storing-an-ordered-list-of-strings-in-javascript",{"name":238,"path":239,"isActive":77},"Что вернет typeof для массива?","/technical-interview/tasks/what-will-typeof-return-for-an-array",{"name":241,"path":242,"isActive":77},"Почему оператор typeof, применённый к массиву, возвращает объект?","/technical-interview/tasks/why-does-the-typeof-operator-applied-to-an-array-return-an-object",{"name":244,"path":245,"isActive":77},"Если нужно хранить список уникальных строк, какую структуру данных выбрать?","/technical-interview/tasks/if-you-need-to-store-a-list-of-unique-strings-which-data-structure-should-i-choose",{"name":247,"path":248,"isActive":77},"Что возвращает typeof для new Set в JavaScript?","/technical-interview/tasks/what-does-typeof-return-for-new-set-in-javascript",{"name":250,"path":251,"isActive":77},"Почему в JavaScript два объекта с одинаковым содержимым при сравнении возвращают false?","/technical-interview/tasks/why-do-two-objects-with-the-same-content-return-false-when-compared-in-javascript",{"name":253,"path":254,"isActive":77},"В чем разница между микро- и макро-тасками в JavaScript?","/technical-interview/tasks/what-is-the-difference-between-micro-and-macro-tasks-in-javascript",{"name":256,"path":257,"isActive":77},"arr.push(0) повлияет на массив так же, как если бы мы выполнили...","/technical-interview/tasks/arr-push-0-will-affect-the-array-in-the-same-way-as-if-we-performed",{"name":259,"path":260,"isActive":77},"Вернуть массив от 1 до n, где числа, кратные 3, заменены на 'fizz', кратные 5 - на 'buzz', а кратные и 3, и 5 одновременно - на 'fizzbuzz'","/technical-interview/tasks/returns-an-array-from-1-to-n-replacing-numbers-that-are-multiples-of-3-with-fizz-numbers-that-are-multiples-of-5-with-buzz-and-numbers-that-are-multiples-of-both-3-and-5-with-fizzbuzz",{"name":262,"path":263,"isActive":77},"Дана строка: 'one.two.three.four.five'. Необходимо из строки сделать вложенный объект","/technical-interview/tasks/the-string-one-two-three-four-five-is-given-it-is-necessary-to-make-a-nested-object-out-of-the-string",{"name":265,"path":266,"isActive":77},"Дано дерево (вложенный объект), надо найти сумму всех вершин","/technical-interview/tasks/given-a-tree-nested-object-it-is-necessary-to-find-the-sum-of-all-vertices",{"name":268,"path":269,"isActive":77},"Для каждого вложенного объекта нужно добавить свойство level, которое равняется числу - номер вложенности","/technical-interview/tasks/for-each-nested-object-you-need-to-add-the-level-property-which-is-equal-to-a-number-the-nesting-number",{"name":271,"path":272,"isActive":77},"Для каждой ветви дерева записать номер вложенности данной ветви","/technical-interview/tasks/for-each-branch-of-the-tree-write-down-the-nesting-number-of-this-branch",{"name":274,"path":275,"isActive":77},"Есть массив, в котором лежат объекты с датами, необходимо отсортировать даты по возрастанию","/technical-interview/tasks/there-is-an-array-containing-objects-with-dates-that-need-to-be-sorted-by-date",{"name":277,"path":278,"isActive":77},"Есть слова в массиве, необходимо определить, состоят ли они из одних и тех же букв","/technical-interview/tasks/there-are-words-in-the-array-it-is-necessary-to-determine-whether-they-consist-of-the-same-letters",{"name":280,"path":281,"isActive":77},"Есть строка, состоящая из разных скобок, необходимо проверить, закрыты ли все","/technical-interview/tasks/there-is-a-string-consisting-of-different-brackets-it-is-necessary-to-check-whether-all-are-closed",{"name":283,"path":284,"isActive":77}," Найти в массиве неповторяющиеся числа","/technical-interview/tasks/find-non-repeating-numbers-in-an-array",{"name":286,"path":287,"isActive":77},"Напишите функцию, который сделает из массива объект","/technical-interview/tasks/write-a-function-that-will-make-an-object-out-of-an-array",{"name":289,"path":290,"isActive":77},"Необходимо проверить, являются ли две строки анаграммами друг друга","/technical-interview/tasks/checks-whether-two-strings-are-anagrams-of-each-other",{"name":292,"path":293,"isActive":77},"Нечётные числа должны отсортироваться по возрастанию, а чётные должны остаться на своих местах","/technical-interview/tasks/odd-numbers-should-be-sorted-in-ascending-order-and-even-numbers-should-remain-in-their-original-positions",{"name":295,"path":296,"isActive":77},"Определить, является ли слово палиндромом","/technical-interview/tasks/determines-whether-a-word-is-a-palindrome",{"name":298,"path":299,"isActive":77},"«Расплющивание» массива","/technical-interview/tasks/flattening-the-array",{"name":301,"path":302,"isActive":77},"Реализовать функцию, принимающую аргументы \"*\", \"1\", \"b\", \"1c\" и возвращающую строку \"1*b*1c\"","/technical-interview/tasks/implement-a-function-that-accepts-arguments-1-b-1c-and-the-return-string-1-b-1c",{"name":304,"path":305,"isActive":77},"Сжатие строк","/technical-interview/tasks/string-compression",{"name":307,"path":308,"isActive":77},"Уникализация значений в массиве","/technical-interview/tasks/unifying-values-in-an-array",{"name":310,"path":311,"isActive":77},"Числа от 1 до 100 находятся в массиве, они хаотично перемешанные, но в нём не хватает одного числа из этой последовательности. Необходимо найти его","/technical-interview/tasks/the-numbers-from-1-to-100-are-in-the-array-they-are-randomly-mixed-but-it-lacks-one-number-from-this-sequence-it-is-necessary-to-find-him",{"title":313,"list":314,"isOpened":77},"React",[315,318,321,324,327,330,333],{"name":316,"path":317,"isActive":77},"Для чего нужен React, какие он решает проблемы?","/technical-interview/tasks/what-is-react-used-for-and-what-problems-does-it-solve",{"name":319,"path":320,"isActive":77},"Какой механизм лежит в основе оптимизации обновлений DOM в React?","/technical-interview/tasks/what-is-the-underlying-mechanism-for-optimizing-dom-updates-in-react",{"name":322,"path":323,"isActive":77},"Если убрать в React VDOM/Fiber, и вручную изменять DOM, разве это не оптимально?","/technical-interview/tasks/if-you-remove-the-vdom-fiber-in-react-and-manually-change-the-dom-isn-t-that-optimal",{"name":325,"path":326,"isActive":77},"Есть блок кода. Что в реальном DOM изменится после нажатия на кнопку?","/technical-interview/tasks/there-is-a-block-of-code-what-changes-in-the-real-dom-after-clicking-the-button",{"name":328,"path":329,"isActive":77},"Есть код, в котором список и кнопка. Что в реальном DOM изменится после нажатия на кнопку?","/technical-interview/tasks/there-is-a-code-in-which-there-is-a-list-and-a-button-what-will-change-in-the-real-dom-after-clicking-on-the-button",{"name":331,"path":332,"isActive":77},"Зачем нужен Redux (Mobx/Effector)? Зачем нужен менеджер состояния? Какие проблемы решает?","/technical-interview/tasks/why-do-we-need-redux-mobx-effector-why-do-we-need-a-state-manager-what-problems-does-it-solve",{"name":334,"path":335,"isActive":77},"Что мешает организовать централизованное состояние без менеджера состояния? Если организовать состояние механизмами реакта: контекстом, стейтом, в чем проблема? Что менеджеры состояния привносят?","/technical-interview/tasks/what-prevents-you-from-organizing-a-centralized-state-without-a-state-manager-if-you-organize-the-state-using-react-context-and-state-mechanisms-what-is-the-problem-what-do-state-managers-add",{"title":337,"list":338,"isOpened":77},"Алгоритмы",[339,342],{"name":340,"path":341,"isActive":77},"Что такое алгоритмическая сложность?","/technical-interview/tasks/what-is-algorithmic-complexity",{"name":343,"path":344,"isActive":77},"Какая алгоритмическая сложность у \"быстрой сортировки\"?","/technical-interview/tasks/what-is-the-algorithmic-complexity-of-quick-sort",{"title":346,"list":347,"isOpened":77},"Дебаггинг",[348],{"name":349,"path":350,"isActive":77},"Как диагностировать и исправить нежелательное изменение цвета фона по клику на кнопку, если исходный код сайта запутан и недоступен для прямого чтения?","/technical-interview/tasks/how-can-diagnose-and-fix-unwanted-background-color-changes-when-clicking-on-a-button-if-the-source-code-of-the-site-is-confusing-and-inaccessible-to-direct-reading",{"title":352,"list":353,"isOpened":77},"Компьютерные сети",[354,357,360,363,366,369,372,375,378,381,384,387,390,393,396,399,402,405,408,411],{"name":355,"path":356,"isActive":77},"Как браузер после ввода домена понимает, откуда брать сайт?","/technical-interview/tasks/how-does-the-browser-know-where-to-get-the-website-after-entering-the-domain",{"name":358,"path":359,"isActive":77},"Что такое DNS, как DNS находит нужный IP-адрес?","/technical-interview/tasks/what-is-dns-and-how-does-dns-find-the-correct-ip-address",{"name":361,"path":362,"isActive":77},"Как домен попадает в DNS в таблицу соответствия: домен – ip","/technical-interview/tasks/how-does-a-domain-get-into-the-dns-mapping-table-domain-ip",{"name":364,"path":365,"isActive":77},"Как браузер решает, какое соединение ему открывать, TCP или UDP?","/technical-interview/tasks/how-does-a-browser-decide-whether-to-open-a-tcp-or-udp-connection",{"name":367,"path":368,"isActive":77},"Ключевые отличия TCP и UDP","/technical-interview/tasks/key-differences-between-tcp-and-udp",{"name":370,"path":371,"isActive":77},"\"TCP/IP\" - кем является TCP, а кем IP в данном случае?","/technical-interview/tasks/tcp-ip-who-is-tcp-and-who-is-ip-in-this-case",{"name":373,"path":374,"isActive":77},"Что такое HTTP и из чего состоит?","/technical-interview/tasks/what-is-http-and-what-does-it-consist-of",{"name":376,"path":377,"isActive":77},"Что такое заголовки в HTTP и зачем они нужны?","/technical-interview/tasks/what-are-http-headers-and-why-do-we-need-them",{"name":379,"path":380,"isActive":77},"Что такое параметры в HTTP?","/technical-interview/tasks/what-are-http-parameters",{"name":382,"path":383,"isActive":77},"Где находится HTML-код в структуре HTTP-ответа?","/technical-interview/tasks/where-is-the-html-code-located-in-the-http-response-structure",{"name":385,"path":386,"isActive":77},"Чем отличаются 1.0, 1.1, 2.0, 3.0 версии HTTP?","/technical-interview/tasks/what-are-the-differences-between-http-versions-1-0-1-1-2-0-and-3-0",{"name":388,"path":389,"isActive":77},"Пользователь авторизован на сайте. Как сервер узнает об этом с последующими другими заходами, что «я – авторизованный пользователь»?","/technical-interview/tasks/the-user-is-logged-in-on-the-website-how-does-the-server-know-that-i-am-an-authorized-user-when-the-user-logs-in-again",{"name":391,"path":392,"isActive":77},"Что такое cookie?","/technical-interview/tasks/what-is-a-cookie",{"name":394,"path":395,"isActive":77},"Кто является инициатором записи cookie в браузере?","/technical-interview/tasks/who-initiates-the-cookie-recording-in-the-browser",{"name":397,"path":398,"isActive":77},"Есть ли возможность с клиента (с браузера) управлять cookie?","/technical-interview/tasks/is-it-possible-to-manage-cookies-from-the-client-browser",{"name":400,"path":401,"isActive":77},"Верно ли утверждение, что злоумышленник, контролирующий роутер и прослушивающий трафик, может получить логины и пароли от сайтов, на которые заходит клиент?","/technical-interview/tasks/is-it-true-that-an-attacker-who-controls-a-router-and-listens-to-traffic-can-obtain-logins-and-passwords-from-websites-that-a-client-visits",{"name":403,"path":404,"isActive":77},"Всё, что идет по HTTPS – оно защищено?","/technical-interview/tasks/is-everything-that-goes-through-https-secure",{"name":406,"path":407,"isActive":77},"Все данные зашифрованы, используется https. Хакер взламывает dns и делает подмену одного ip на другой, на фишинговый сайт. В этом случае, злоумышленник может получить данные (логин \\ пароль)?","/technical-interview/tasks/all-data-is-encrypted-https-is-used-let-s-assume-a-hacker-hacks-the-dns-and-makes-a-substitution-of-one-ip-for-another-a-phishing-site",{"name":409,"path":410,"isActive":77},"Есть веб-приложение. Помимо HTTP, какие протоколы того же уровня (Application Layer) можно дополнительно использовать в веб-приложении в браузере?","/technical-interview/tasks/there-is-a-web-application-in-addition-to-http-what-other-protocols-of-the-same-level-application-layer-can-be-used-in-the-web-application-in-browser",{"name":412,"path":413,"isActive":77},"Каким способом может выполняться авторизация пользователя на сайте?","/technical-interview/tasks/how-can-a-user-be-authorized-on-a-website",{"title":415,"list":416,"isOpened":77},"Отрисовка в браузере",[417,420,423,426,429,432],{"name":418,"path":419,"isActive":77},"Что происходит, когда HTTP прислал HTML? Что браузер дальше делает c HTML с учетом того, что она валидная?","/technical-interview/tasks/what-happens-when-http-sends-html-what-does-the-browser-do-with-this-html-given-that-it-is-valid",{"name":421,"path":422,"isActive":77},"Как браузер парсит JavaScript и изображения при рендеринге?","/technical-interview/tasks/how-the-browser-parses-javascript-and-images-when-rendering",{"name":424,"path":425,"isActive":77},"Что в браузере блокирует рендеринг страницы?","/technical-interview/tasks/what-is-blocking-the-page-rendering-in-the-browser",{"name":427,"path":428,"isActive":77},"Что такое DOM в браузере? Что такое CSSOM?","/technical-interview/tasks/what-is-dom-in-a-browser-what-is-cssom",{"name":430,"path":431,"isActive":77},"Что является узлами в DOM?","/technical-interview/tasks/what-are-nodes-in-the-dom",{"name":433,"path":434,"isActive":77},"Из чего состоит CSSOM?","/technical-interview/tasks/what-does-cssom-consist-of",{"title":436,"list":437,"isOpened":77},"Ревью кода",[438],{"name":439,"path":440,"isActive":77},"По каким характеристикам, ревьюер понимает, что данный код - хороший, а этот код - плохой?","/technical-interview/tasks/how-does-a-reviewer-know-which-code-is-good-and-which-code-is-bad",{"title":442,"list":443,"isOpened":77},"Теория вероятности",[444,447,450],{"name":445,"path":446,"isActive":77},"В комнате три человека. Какова вероятность того, что хотя бы двое из них одного пола? То есть два и более.","/technical-interview/tasks/there-are-three-people-in-the-room-what-is-the-probability-that-at-least-two-of-them-are-of-the-same-sex-that-is-two-or-more",{"name":448,"path":449,"isActive":77},"Есть монета. Ее подбрасывают пять раз подряд. Каждый раз записывается, что выпало - орел или решка. Сколько разных последовательностей орлов и решек может при этом получиться?","/technical-interview/tasks/there-is-a-coin-it-is-tossed-five-times-in-a-row-each-time-it-is-recorded-whether-it-lands-on-heads-or-tails-how-many-different-sequences-of-heads-and-tails-can-be-obtained",{"name":451,"path":452,"isActive":77},"Как гарантированно найти лёгкую фальшивую монету среди 8 за минимальное число взвешиваний на чашечных весах?","/technical-interview/tasks/how-can-you-guarantee-to-find-an-easy-fake-coin-among-8-in-the-minimum-number-of-weighings-on-a-balance-scale",{"slugs":454},[455,458,460,462,464,467,470,472,474,476,478,480,483,485,487,489,491,493,495,497,499,501,503,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,539,541,543,545,547,549,551,553,555,557,559,561,564,566,568,570,572,574,576,578,580,582,584,586,588,590,592,594,596,598,600,602,604,606,608,610,612,614,616,618,620,622,624,626,628,630,632,634,636,638,640,642,644,646,648,650,652,654,656,658,660,662,664,665,667,669,671,673],{"name":456,"value":457},"Теоретические задания","theoretical-tasks",{"name":212,"value":459},"what-this-code-will-return-typeof-function",{"name":111,"value":461},"where-to-begin",{"name":179,"value":463},"why-is-it-dangerous-to-write-directly-to-the-prototypes-of-basic-types",{"name":465,"value":466},"Backend","backend",{"name":468,"value":469},"Frontend","frontend",{"name":176,"value":471},"prototype-what-logical-values-will-be-received-in-console-log",{"name":292,"value":473},"odd-numbers-should-be-sorted-in-ascending-order-and-even-numbers-should-remain-in-their-original-positions",{"name":283,"value":475},"find-non-repeating-numbers-in-an-array",{"name":256,"value":477},"arr-push-0-will-affect-the-array-in-the-same-way-as-if-we-performed",{"name":262,"value":479},"the-string-one-two-three-four-five-is-given-it-is-necessary-to-make-a-nested-object-out-of-the-string",{"name":481,"value":482},"Реализовать функцию, похоже как в Jquery","implement-a-function-similar-to-jquery",{"name":268,"value":484},"for-each-nested-object-you-need-to-add-the-level-property-which-is-equal-to-a-number-the-nesting-number",{"name":185,"value":486},"what-value-will-the-console-output-with-object-property",{"name":188,"value":488},"what-will-be-displayed-in-console-log-arr-0-arr-0",{"name":259,"value":490},"returns-an-array-from-1-to-n-replacing-numbers-that-are-multiples-of-3-with-fizz-numbers-that-are-multiples-of-5-with-buzz-and-numbers-that-are-multiples-of-both-3-and-5-with-fizzbuzz",{"name":289,"value":492},"checks-whether-two-strings-are-anagrams-of-each-other",{"name":295,"value":494},"determines-whether-a-word-is-a-palindrome",{"name":274,"value":496},"there-is-an-array-containing-objects-with-dates-that-need-to-be-sorted-by-date",{"name":301,"value":498},"implement-a-function-that-accepts-arguments-1-b-1c-and-the-return-string-1-b-1c",{"name":265,"value":500},"given-a-tree-nested-object-it-is-necessary-to-find-the-sum-of-all-vertices",{"name":271,"value":502},"for-each-branch-of-the-tree-write-down-the-nesting-number-of-this-branch",{"name":277,"value":504},"there-are-words-in-the-array-it-is-necessary-to-determine-whether-they-consist-of-the-same-letters",{"name":310,"value":506},"the-numbers-from-1-to-100-are-in-the-array-they-are-randomly-mixed-but-it-lacks-one-number-from-this-sequence-it-is-necessary-to-find-him",{"name":280,"value":508},"there-is-a-string-consisting-of-different-brackets-it-is-necessary-to-check-whether-all-are-closed",{"name":286,"value":510},"write-a-function-that-will-make-an-object-out-of-an-array",{"name":191,"value":512},"what-will-console-log-output-as-a-result-of-executing-the-while-loop",{"name":194,"value":514},"there-is-a-function-and-an-object-write-all-the-ways-you-know-to-output-the-value-of-x-from-an-object-in-the-console-using-the-function",{"name":206,"value":516},"what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-negative-string-index",{"name":209,"value":518},"what-will-the-console-output-if-an-array-element-is-deleted-using-the-delete-operator",{"name":307,"value":520},"unifying-values-in-an-array",{"name":298,"value":522},"flattening-the-array",{"name":197,"value":524},"what-will-the-book-get-upper-name-method-return",{"name":304,"value":526},"string-compression",{"name":203,"value":528},"what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-positive-string-index",{"name":215,"value":530},"what-will-happen-when-an-object-is-passed-as-an-argument-to-a-function-and-the-code-is-executed",{"name":355,"value":532},"how-does-the-browser-know-where-to-get-the-website-after-entering-the-domain",{"name":361,"value":534},"how-does-a-domain-get-into-the-dns-mapping-table-domain-ip",{"name":364,"value":536},"how-does-a-browser-decide-whether-to-open-a-tcp-or-udp-connection",{"name":367,"value":538},"key-differences-between-tcp-and-udp",{"name":370,"value":540},"tcp-ip-who-is-tcp-and-who-is-ip-in-this-case",{"name":373,"value":542},"what-is-http-and-what-does-it-consist-of",{"name":376,"value":544},"what-are-http-headers-and-why-do-we-need-them",{"name":379,"value":546},"what-are-http-parameters",{"name":382,"value":548},"where-is-the-html-code-located-in-the-http-response-structure",{"name":170,"value":550},"what-is-html",{"name":385,"value":552},"what-are-the-differences-between-http-versions-1-0-1-1-2-0-and-3-0",{"name":388,"value":554},"the-user-is-logged-in-on-the-website-how-does-the-server-know-that-i-am-an-authorized-user-when-the-user-logs-in-again",{"name":391,"value":556},"what-is-a-cookie",{"name":394,"value":558},"who-initiates-the-cookie-recording-in-the-browser",{"name":397,"value":560},"is-it-possible-to-manage-cookies-from-the-client-browser",{"name":562,"value":563},"Лайвкодинг","livecoding",{"name":182,"value":565},"what-will-the-following-code-return-object-create-null-has-own-property-to-string",{"name":403,"value":567},"is-everything-that-goes-through-https-secure",{"name":406,"value":569},"all-data-is-encrypted-https-is-used-let-s-assume-a-hacker-hacks-the-dns-and-makes-a-substitution-of-one-ip-for-another-a-phishing-site",{"name":409,"value":571},"there-is-a-web-application-in-addition-to-http-what-other-protocols-of-the-same-level-application-layer-can-be-used-in-the-web-application-in-browser",{"name":421,"value":573},"how-the-browser-parses-javascript-and-images-when-rendering",{"name":418,"value":575},"what-happens-when-http-sends-html-what-does-the-browser-do-with-this-html-given-that-it-is-valid",{"name":424,"value":577},"what-is-blocking-the-page-rendering-in-the-browser",{"name":427,"value":579},"what-is-dom-in-a-browser-what-is-cssom",{"name":430,"value":581},"what-are-nodes-in-the-dom",{"name":433,"value":583},"what-does-cssom-consist-of",{"name":131,"value":585},"the-html-code-is-given-what-will-be-the-color-of-the-some-dummy-text",{"name":134,"value":587},"there-is-a-template-for-html-and-css-code-what-color-will-the-text-thus-constant-have",{"name":137,"value":589},"there-is-a-template-for-embedded-html-code-what-will-be-the-color-of-the-one-more-dummy-text",{"name":140,"value":591},"there-is-a-template-for-embedded-html-code-will-there-be-a-display-does-bodys-block-affect-span",{"name":143,"value":593},"there-is-an-html-code-will-font-weight-affect-span",{"name":146,"value":595},"what-are-the-differences-between-flexbox-and-grid",{"name":149,"value":597},"do-flexbox-and-grid-replace-each-other",{"name":152,"value":599},"there-are-css-and-js-animations-what-is-the-difference-between-them-and-which-is-faster-and-more-convenient",{"name":115,"value":601},"tasks",{"name":218,"value":603},"what-are-the-ways-to-declare-a-function-in-javascript",{"name":221,"value":605},"what-is-this-in-javascript",{"name":224,"value":607},"what-is-an-event-loop-and-how-does-it-work",{"name":89,"value":609},"what-happens-if-you-call-typeof-on-an-undeclared-variable",{"name":229,"value":611},"what-does-the-typeof-operator-show-in-javascript",{"name":232,"value":613},"what-types-of-data-exist-in-javascript",{"name":235,"value":615},"what-is-the-best-structure-to-use-for-storing-an-ordered-list-of-strings-in-javascript",{"name":238,"value":617},"what-will-typeof-return-for-an-array",{"name":241,"value":619},"why-does-the-typeof-operator-applied-to-an-array-return-an-object",{"name":244,"value":621},"if-you-need-to-store-a-list-of-unique-strings-which-data-structure-should-i-choose",{"name":247,"value":623},"what-does-typeof-return-for-new-set-in-javascript",{"name":316,"value":625},"what-is-react-used-for-and-what-problems-does-it-solve",{"name":322,"value":627},"if-you-remove-the-vdom-fiber-in-react-and-manually-change-the-dom-isn-t-that-optimal",{"name":325,"value":629},"there-is-a-block-of-code-what-changes-in-the-real-dom-after-clicking-the-button",{"name":328,"value":631},"there-is-a-code-in-which-there-is-a-list-and-a-button-what-will-change-in-the-real-dom-after-clicking-on-the-button",{"name":331,"value":633},"why-do-we-need-redux-mobx-effector-why-do-we-need-a-state-manager-what-problems-does-it-solve",{"name":349,"value":635},"how-can-diagnose-and-fix-unwanted-background-color-changes-when-clicking-on-a-button-if-the-source-code-of-the-site-is-confusing-and-inaccessible-to-direct-reading",{"name":158,"value":637},"developed-it-committed-it-and-launched-it-it-turned-out-that-i-had-pushed-it-to-the-wrong-branch-or-rather-the-commit-was-in-the-wrong-branch-what-actions",{"name":161,"value":639},"git-has-several-options-for-merging-branches-which-ones-how-are-they-different",{"name":164,"value":641},"what-are-the-branching-strategies-for-the-team-what-is-it",{"name":439,"value":643},"how-does-a-reviewer-know-which-code-is-good-and-which-code-is-bad",{"name":122,"value":645},"here-is-a-fragment-of-a-bash-script-cd-mkdir-foo-what-is-happening-in-this-script",{"name":125,"value":647},"here-is-a-fragment-of-a-bash-script-target-ps-af-grep-1-head-n-1",{"name":340,"value":649},"what-is-algorithmic-complexity",{"name":343,"value":651},"what-is-the-algorithmic-complexity-of-quick-sort",{"name":250,"value":653},"why-do-two-objects-with-the-same-content-return-false-when-compared-in-javascript",{"name":412,"value":655},"how-can-a-user-be-authorized-on-a-website",{"name":253,"value":657},"what-is-the-difference-between-micro-and-macro-tasks-in-javascript",{"name":445,"value":659},"there-are-three-people-in-the-room-what-is-the-probability-that-at-least-two-of-them-are-of-the-same-sex-that-is-two-or-more",{"name":448,"value":661},"there-is-a-coin-it-is-tossed-five-times-in-a-row-each-time-it-is-recorded-whether-it-lands-on-heads-or-tails-how-many-different-sequences-of-heads-and-tails-can-be-obtained",{"name":451,"value":663},"how-can-you-guarantee-to-find-an-easy-fake-coin-among-8-in-the-minimum-number-of-weighings-on-a-balance-scale",{"name":105,"value":106},{"name":400,"value":666},"is-it-true-that-an-attacker-who-controls-a-router-and-listens-to-traffic-can-obtain-logins-and-passwords-from-websites-that-a-client-visits",{"name":358,"value":668},"what-is-dns-and-how-does-dns-find-the-correct-ip-address",{"name":200,"value":670},"variables-are-declared-as-follows-specify-the-correct-statement",{"name":319,"value":672},"what-is-the-underlying-mechanism-for-optimizing-dom-updates-in-react",{"name":334,"value":674},"what-prevents-you-from-organizing-a-centralized-state-without-a-state-manager-if-you-organize-the-state-using-react-context-and-state-mechanisms-what-is-the-problem-what-do-state-managers-add",{"cooperation":676,"copyright":679,"reportError":680,"socialNetwork":682},{"link":677,"title":678},"https://t.me/baurinanton","Сотрудничество","© “GOOD WEB JOB!”",{"label":681,"link":677},"Сообщить об ошибке",{"label":683,"socialNetworkList":684},"Мы в соцсетях:",[685,688,691],{"icon":19,"link":686,"title":687},"https://max.ru/u/f9LHodD0cOKMaukdnnahTeL5pwvjrPfUaZ4S8_1rsNy9I9qsmc9Ar3kP_y8","Max",{"icon":689,"link":677,"title":690},"ic:baseline-telegram","Telegram",{"icon":692,"link":693,"title":694},"ri:vk-fill","https://vk.com/baurinanton","VK",{"data":696,"body":697},{},{"type":698,"children":699},"root",[700],{"type":701,"tag":702,"props":703,"children":704},"element","p",{},[705],{"type":706,"value":89},"text",{"data":708,"body":709},{},{"type":698,"children":710},[711],{"type":701,"tag":702,"props":712,"children":713},{},[714,716,723],{"type":706,"value":715},"Будет выброшен ",{"type":701,"tag":717,"props":718,"children":720},"code",{"className":719},[],[721],{"type":706,"value":722},"ReferenceError",{"type":706,"value":724},", потому что переменная не объявлена",{"data":726,"body":727},{},{"type":698,"children":728},[729],{"type":701,"tag":702,"props":730,"children":731},{},[732,734,740],{"type":706,"value":733},"Вернётся строка ",{"type":701,"tag":717,"props":735,"children":737},{"className":736},[],[738],{"type":706,"value":739},"undefined",{"type":706,"value":741}," и ошибки не будет",{"data":743,"body":744},{},{"type":698,"children":745},[746],{"type":701,"tag":702,"props":747,"children":748},{},[749,751,757],{"type":706,"value":750},"Вернётся ",{"type":701,"tag":717,"props":752,"children":754},{"className":753},[],[755],{"type":706,"value":756},"null",{"type":706,"value":758},", так как переменная отсутствует",{"data":760,"body":761},{},{"type":698,"children":762},[763],{"type":701,"tag":702,"props":764,"children":765},{},[766,767],{"type":706,"value":733},{"type":701,"tag":717,"props":768,"children":770},{"className":769},[],[771],{"type":706,"value":772},"\"not defined\"",{"data":774,"body":775},{},{"type":698,"children":776},[777],{"type":701,"tag":702,"props":778,"children":779},{},[780,782,788,790,796,798,804],{"type":706,"value":781},"Следует вспомнить, что ",{"type":701,"tag":717,"props":783,"children":785},{"className":784},[],[786],{"type":706,"value":787},"typeof",{"type":706,"value":789}," — особый оператор, который умеет проверять несуществующие идентификаторы без исключения, но не спасает от TDZ у ",{"type":701,"tag":717,"props":791,"children":793},{"className":792},[],[794],{"type":706,"value":795},"let",{"type":706,"value":797},"/",{"type":701,"tag":717,"props":799,"children":801},{"className":800},[],[802],{"type":706,"value":803},"const",{"type":706,"value":805},".",{"data":807,"body":808},{},{"type":698,"children":809},[810],{"type":701,"tag":702,"props":811,"children":812},{},[813,819,821,827],{"type":701,"tag":814,"props":815,"children":816},"strong",{},[817],{"type":706,"value":818},"Правильный вариант: 2",{"type":706,"value":820}," - вернётся строка ",{"type":701,"tag":717,"props":822,"children":824},{"className":823},[],[825],{"type":706,"value":826},"\"undefined\"",{"type":706,"value":741},{"data":829,"body":830},{},{"type":698,"children":831},[832],{"type":701,"tag":702,"props":833,"children":834},{},[835,837,842,844,849,851,856],{"type":706,"value":836},"Оператор ",{"type":701,"tag":717,"props":838,"children":840},{"className":839},[],[841],{"type":706,"value":787},{"type":706,"value":843}," является унарным оператором JavaScript, который возвращает строку с типом значения. Особенность ",{"type":701,"tag":717,"props":845,"children":847},{"className":846},[],[848],{"type":706,"value":787},{"type":706,"value":850}," состоит в том, что он умеет безопасно обрабатывать обращение к идентификатору, которого не существует в текущей области видимости: вместо выброса исключения возвращается строка ",{"type":701,"tag":717,"props":852,"children":854},{"className":853},[],[855],{"type":706,"value":739},{"type":706,"value":805},{"data":858,"body":859},{},{"type":698,"children":860},[861],{"type":701,"tag":702,"props":862,"children":863},{},[864,866,871,873,878,880,885],{"type":706,"value":865},"Строка ",{"type":701,"tag":717,"props":867,"children":869},{"className":868},[],[870],{"type":706,"value":739},{"type":706,"value":872}," — это результат ",{"type":701,"tag":717,"props":874,"children":876},{"className":875},[],[877],{"type":706,"value":787},{"type":706,"value":879},", а не само значение переменной; то есть возвращается именно текст ",{"type":701,"tag":717,"props":881,"children":883},{"className":882},[],[884],{"type":706,"value":739},{"type":706,"value":805},{"data":887,"body":888},{},{"type":698,"children":889},[890,902,921],{"type":701,"tag":702,"props":891,"children":892},{},[893,895,900],{"type":706,"value":894},"В обычном выражении обращение к необъявленной переменной вызывает ",{"type":701,"tag":717,"props":896,"children":898},{"className":897},[],[899],{"type":706,"value":722},{"type":706,"value":901},", потому что движок пытается получить значение по имени, но не находит привязку (binding) в окружениях выполнения.",{"type":701,"tag":702,"props":903,"children":904},{},[905,907,912,914,919],{"type":706,"value":906},"У ",{"type":701,"tag":717,"props":908,"children":910},{"className":909},[],[911],{"type":706,"value":787},{"type":706,"value":913}," сделано исключение: при проверке идентификатора, который невозможно разрешить (unresolvable reference), результатом становится строка ",{"type":701,"tag":717,"props":915,"children":917},{"className":916},[],[918],{"type":706,"value":739},{"type":706,"value":920},", а исключение не выбрасывается. Это исторически и спецификационно закреплённое поведение, чтобы можно было проверять наличие глобальных переменных (например, API окружения) без риска падения программы.",{"type":701,"tag":922,"props":923,"children":927},"pre",{"className":924,"code":926,"language":706},[925],"language-text","// Необъявленная переменная (не существует нигде)\ntypeof notDeclared;           // \"undefined\"\n\n// То же самое, но обычное чтение значения:\nnotDeclared;                  // ReferenceError: notDeclared is not defined\n",[928],{"type":701,"tag":717,"props":929,"children":931},{"__ignoreMap":930},"",[932],{"type":706,"value":926},{"data":934,"body":935},{},{"type":698,"children":936},[937,942,1018,1043],{"type":701,"tag":702,"props":938,"children":939},{},[940],{"type":706,"value":941},"Термины часто путаются, но ситуации разные:",{"type":701,"tag":943,"props":944,"children":945},"ul",{},[946,994],{"type":701,"tag":947,"props":948,"children":949},"li",{},[950,952,958,960,965,966,971,972,978,979,985,986,992],{"type":706,"value":951},"Необъявленная переменная: идентификатор вообще не был объявлен через ",{"type":701,"tag":717,"props":953,"children":955},{"className":954},[],[956],{"type":706,"value":957},"var",{"type":706,"value":959},", ",{"type":701,"tag":717,"props":961,"children":963},{"className":962},[],[964],{"type":706,"value":795},{"type":706,"value":959},{"type":701,"tag":717,"props":967,"children":969},{"className":968},[],[970],{"type":706,"value":803},{"type":706,"value":959},{"type":701,"tag":717,"props":973,"children":975},{"className":974},[],[976],{"type":706,"value":977},"function",{"type":706,"value":959},{"type":701,"tag":717,"props":980,"children":982},{"className":981},[],[983],{"type":706,"value":984},"class",{"type":706,"value":959},{"type":701,"tag":717,"props":987,"children":989},{"className":988},[],[990],{"type":706,"value":991},"import",{"type":706,"value":993}," в доступных областях видимости",{"type":701,"tag":947,"props":995,"children":996},{},[997,999,1004,1005,1010,1011,1016],{"type":706,"value":998},"Объявленная, но недоступная из-за TDZ (temporal dead zone): переменная объявлена через ",{"type":701,"tag":717,"props":1000,"children":1002},{"className":1001},[],[1003],{"type":706,"value":795},{"type":706,"value":797},{"type":701,"tag":717,"props":1006,"children":1008},{"className":1007},[],[1009],{"type":706,"value":803},{"type":706,"value":797},{"type":701,"tag":717,"props":1012,"children":1014},{"className":1013},[],[1015],{"type":706,"value":984},{"type":706,"value":1017},", но обращение происходит до выполнения строки инициализации",{"type":701,"tag":702,"props":1019,"children":1020},{},[1021,1023,1028,1030,1035,1037,1042],{"type":706,"value":1022},"Для TDZ исключение из правила ",{"type":701,"tag":717,"props":1024,"children":1026},{"className":1025},[],[1027],{"type":706,"value":787},{"type":706,"value":1029}," не применяется: при обращении к переменной в TDZ будет выброшен ",{"type":701,"tag":717,"props":1031,"children":1033},{"className":1032},[],[1034],{"type":706,"value":722},{"type":706,"value":1036},", даже если используется ",{"type":701,"tag":717,"props":1038,"children":1040},{"className":1039},[],[1041],{"type":706,"value":787},{"type":706,"value":805},{"type":701,"tag":922,"props":1044,"children":1047},{"className":1045,"code":1046,"language":706},[925],"// Пример TDZ\n{\n  // Переменная объявлена ниже, но сейчас она в TDZ\n  typeof tdzVar;              // ReferenceError: Cannot access 'tdzVar' before initialization\n  let tdzVar = 1;\n}\n",[1048],{"type":701,"tag":717,"props":1049,"children":1050},{"__ignoreMap":930},[1051],{"type":706,"value":1046},{"data":1053,"body":1054},{},{"type":698,"children":1055},[1056],{"type":701,"tag":702,"props":1057,"children":1058},{},[1059,1061,1066,1068,1073,1074,1079,1081,1086],{"type":706,"value":1060},"Если планируется \"безопасная проверка существования\" через ",{"type":701,"tag":717,"props":1062,"children":1064},{"className":1063},[],[1065],{"type":706,"value":787},{"type":706,"value":1067},", важно, чтобы проверяемое имя не было объявлено как ",{"type":701,"tag":717,"props":1069,"children":1071},{"className":1070},[],[1072],{"type":706,"value":795},{"type":706,"value":797},{"type":701,"tag":717,"props":1075,"children":1077},{"className":1076},[],[1078],{"type":706,"value":803},{"type":706,"value":1080}," в той же области ниже по коду, иначе возможен ",{"type":701,"tag":717,"props":1082,"children":1084},{"className":1083},[],[1085],{"type":706,"value":722},{"type":706,"value":1087}," из-за TDZ.",{"data":1089,"body":1090},{},{"type":698,"children":1091},[1092,1102,1111],{"type":701,"tag":702,"props":1093,"children":1094},{},[1095,1100],{"type":701,"tag":717,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":706,"value":787},{"type":706,"value":1101}," всегда возвращает строку. Самые типичные результаты:",{"type":701,"tag":922,"props":1103,"children":1106},{"className":1104,"code":1105,"language":706},[925],"typeof undefined;             // \"undefined\"\ntypeof null;                  // \"object\"        // историческая особенность языка\ntypeof 123;                   // \"number\"\ntypeof 10n;                   // \"bigint\"\ntypeof \"txt\";                 // \"string\"\ntypeof true;                  // \"boolean\"\ntypeof Symbol(\"s\");           // \"symbol\"\ntypeof function(){};          // \"function\"\ntypeof {};                    // \"object\"\n",[1107],{"type":701,"tag":717,"props":1108,"children":1109},{"__ignoreMap":930},[1110],{"type":706,"value":1105},{"type":701,"tag":702,"props":1112,"children":1113},{},[1114,1116,1121,1123,1128,1130,1135],{"type":706,"value":1115},"Отсюда видно, почему вариант “вернётся ",{"type":701,"tag":717,"props":1117,"children":1119},{"className":1118},[],[1120],{"type":706,"value":756},{"type":706,"value":1122},"” неверен: ",{"type":701,"tag":717,"props":1124,"children":1126},{"className":1125},[],[1127],{"type":706,"value":787},{"type":706,"value":1129}," не возвращает ",{"type":701,"tag":717,"props":1131,"children":1133},{"className":1132},[],[1134],{"type":706,"value":756},{"type":706,"value":1136}," ни в каком случае; он возвращает только строку.",{"data":1138,"body":1139},{},{"type":698,"children":1140},[1141],{"type":701,"tag":943,"props":1142,"children":1143},{},[1144,1168,1179,1202],{"type":701,"tag":947,"props":1145,"children":1146},{},[1147,1148,1153,1155,1160,1162],{"type":706,"value":715},{"type":701,"tag":717,"props":1149,"children":1151},{"className":1150},[],[1152],{"type":706,"value":722},{"type":706,"value":1154},", потому что переменная не объявлена — неверно для ",{"type":701,"tag":717,"props":1156,"children":1158},{"className":1157},[],[1159],{"type":706,"value":787},{"type":706,"value":1161}," и необъявленной переменной; верно для обычного чтения значения ",{"type":701,"tag":717,"props":1163,"children":1165},{"className":1164},[],[1166],{"type":706,"value":1167},"x",{"type":701,"tag":947,"props":1169,"children":1170},{},[1171,1172,1177],{"type":706,"value":733},{"type":701,"tag":717,"props":1173,"children":1175},{"className":1174},[],[1176],{"type":706,"value":739},{"type":706,"value":1178}," и ошибки не будет — верно (для действительно необъявленной переменной)",{"type":701,"tag":947,"props":1180,"children":1181},{},[1182,1183,1188,1190,1195,1197],{"type":706,"value":750},{"type":701,"tag":717,"props":1184,"children":1186},{"className":1185},[],[1187],{"type":706,"value":756},{"type":706,"value":1189},", так как переменная отсутствует — неверно, ",{"type":701,"tag":717,"props":1191,"children":1193},{"className":1192},[],[1194],{"type":706,"value":787},{"type":706,"value":1196}," возвращает строку, а не ",{"type":701,"tag":717,"props":1198,"children":1200},{"className":1199},[],[1201],{"type":706,"value":756},{"type":701,"tag":947,"props":1203,"children":1204},{},[1205,1206,1212,1214,1219,1221,1227,1229,1234],{"type":706,"value":733},{"type":701,"tag":717,"props":1207,"children":1209},{"className":1208},[],[1210],{"type":706,"value":1211},"not defined",{"type":706,"value":1213}," — неверно; такой строки ",{"type":701,"tag":717,"props":1215,"children":1217},{"className":1216},[],[1218],{"type":706,"value":787},{"type":706,"value":1220}," не возвращает (сообщение об ошибке ",{"type":701,"tag":717,"props":1222,"children":1224},{"className":1223},[],[1225],{"type":706,"value":1226},"is not defined",{"type":706,"value":1228}," относится к ",{"type":701,"tag":717,"props":1230,"children":1232},{"className":1231},[],[1233],{"type":706,"value":722},{"type":706,"value":1235}," при обычном доступе)",{"data":1237,"body":1238},{},{"type":698,"children":1239},[1240],{"type":701,"tag":1241,"props":1242,"children":1243},"table",{},[1244,1268],{"type":701,"tag":1245,"props":1246,"children":1247},"thead",{},[1248],{"type":701,"tag":1249,"props":1250,"children":1251},"tr",{},[1252,1258,1263],{"type":701,"tag":1253,"props":1254,"children":1255},"th",{},[1256],{"type":706,"value":1257},"Ситуация",{"type":701,"tag":1253,"props":1259,"children":1260},{},[1261],{"type":706,"value":1262},"Пример",{"type":701,"tag":1253,"props":1264,"children":1265},{},[1266],{"type":706,"value":1267},"Результат",{"type":701,"tag":1269,"props":1270,"children":1271},"tbody",{},[1272,1298,1323,1358,1389,1424],{"type":701,"tag":1249,"props":1273,"children":1274},{},[1275,1281,1290],{"type":701,"tag":1276,"props":1277,"children":1278},"td",{},[1279],{"type":706,"value":1280},"Имя не объявлено нигде",{"type":701,"tag":1276,"props":1282,"children":1283},{},[1284],{"type":701,"tag":717,"props":1285,"children":1287},{"className":1286},[],[1288],{"type":706,"value":1289},"typeof noSuchName",{"type":701,"tag":1276,"props":1291,"children":1292},{},[1293],{"type":701,"tag":717,"props":1294,"children":1296},{"className":1295},[],[1297],{"type":706,"value":826},{"type":701,"tag":1249,"props":1299,"children":1300},{},[1301,1306,1315],{"type":701,"tag":1276,"props":1302,"children":1303},{},[1304],{"type":706,"value":1305},"Обычное чтение несуществующего имени",{"type":701,"tag":1276,"props":1307,"children":1308},{},[1309],{"type":701,"tag":717,"props":1310,"children":1312},{"className":1311},[],[1313],{"type":706,"value":1314},"noSuchName",{"type":701,"tag":1276,"props":1316,"children":1317},{},[1318],{"type":701,"tag":717,"props":1319,"children":1321},{"className":1320},[],[1322],{"type":706,"value":722},{"type":701,"tag":1249,"props":1324,"children":1325},{},[1326,1341,1350],{"type":701,"tag":1276,"props":1327,"children":1328},{},[1329,1334,1336],{"type":701,"tag":717,"props":1330,"children":1332},{"className":1331},[],[1333],{"type":706,"value":957},{"type":706,"value":1335}," объявлена, но ещё ",{"type":701,"tag":717,"props":1337,"children":1339},{"className":1338},[],[1340],{"type":706,"value":739},{"type":701,"tag":1276,"props":1342,"children":1343},{},[1344],{"type":701,"tag":717,"props":1345,"children":1347},{"className":1346},[],[1348],{"type":706,"value":1349},"var a; typeof a",{"type":701,"tag":1276,"props":1351,"children":1352},{},[1353],{"type":701,"tag":717,"props":1354,"children":1356},{"className":1355},[],[1357],{"type":706,"value":826},{"type":701,"tag":1249,"props":1359,"children":1360},{},[1361,1372,1381],{"type":701,"tag":1276,"props":1362,"children":1363},{},[1364,1370],{"type":701,"tag":717,"props":1365,"children":1367},{"className":1366},[],[1368],{"type":706,"value":1369},"let/const",{"type":706,"value":1371}," в TDZ",{"type":701,"tag":1276,"props":1373,"children":1374},{},[1375],{"type":701,"tag":717,"props":1376,"children":1378},{"className":1377},[],[1379],{"type":706,"value":1380},"{ typeof b; let b = 1; }",{"type":701,"tag":1276,"props":1382,"children":1383},{},[1384],{"type":701,"tag":717,"props":1385,"children":1387},{"className":1386},[],[1388],{"type":706,"value":722},{"type":701,"tag":1249,"props":1390,"children":1391},{},[1392,1397,1406],{"type":701,"tag":1276,"props":1393,"children":1394},{},[1395],{"type":706,"value":1396},"Объект и отсутствующее свойство",{"type":701,"tag":1276,"props":1398,"children":1399},{},[1400],{"type":701,"tag":717,"props":1401,"children":1403},{"className":1402},[],[1404],{"type":706,"value":1405},"typeof obj.missing",{"type":701,"tag":1276,"props":1407,"children":1408},{},[1409,1414,1416,1422],{"type":701,"tag":717,"props":1410,"children":1412},{"className":1411},[],[1413],{"type":706,"value":826},{"type":706,"value":1415}," (если ",{"type":701,"tag":717,"props":1417,"children":1419},{"className":1418},[],[1420],{"type":706,"value":1421},"obj",{"type":706,"value":1423}," определён)",{"type":701,"tag":1249,"props":1425,"children":1426},{},[1427,1432,1440],{"type":701,"tag":1276,"props":1428,"children":1429},{},[1430],{"type":706,"value":1431},"Сам объект не определён",{"type":701,"tag":1276,"props":1433,"children":1434},{},[1435],{"type":701,"tag":717,"props":1436,"children":1438},{"className":1437},[],[1439],{"type":706,"value":1405},{"type":701,"tag":1276,"props":1441,"children":1442},{},[1443,1448,1450,1455],{"type":701,"tag":717,"props":1444,"children":1446},{"className":1445},[],[1447],{"type":706,"value":722},{"type":706,"value":1449}," (потому что сначала нужно прочитать ",{"type":701,"tag":717,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":706,"value":1421},{"type":706,"value":1456},")",{"data":1458,"body":1459},{},{"type":698,"children":1460},[1461],{"type":701,"tag":702,"props":1462,"children":1463},{},[1464,1466,1471,1473,1478,1480,1485],{"type":706,"value":1465},"Проверка ",{"type":701,"tag":717,"props":1467,"children":1469},{"className":1468},[],[1470],{"type":706,"value":1405},{"type":706,"value":1472}," безопасна только при гарантированно существующем ",{"type":701,"tag":717,"props":1474,"children":1476},{"className":1475},[],[1477],{"type":706,"value":1421},{"type":706,"value":1479},". Если ",{"type":701,"tag":717,"props":1481,"children":1483},{"className":1482},[],[1484],{"type":706,"value":1421},{"type":706,"value":1486}," не объявлен, ошибка возникнет ещё до доступа к свойству.",{"data":1488,"body":1489},{},{"type":698,"children":1490},[1491],{"type":701,"tag":922,"props":1492,"children":1495},{"className":1493,"code":1494,"language":706},[925],"Шаг 1: Это typeof Identifier?\n  ├─ Да → Шаг 2\n  └─ Нет → обычные правила вычисления выражений\n\nШаг 2: Идентификатор существует в области видимости?\n  ├─ Нет (unresolvable) → результат \"undefined\", без ошибки\n  └─ Да → Шаг 3\n\nШаг 3: Идентификатор в TDZ?\n  ├─ Да → ReferenceError\n  └─ Нет → вернуть строку типа значения\n",[1496],{"type":701,"tag":717,"props":1497,"children":1498},{"__ignoreMap":930},[1499],{"type":706,"value":1494},{"data":1501,"body":1502},{},{"type":698,"children":1503},[1504],{"type":701,"tag":702,"props":1505,"children":1506},{},[1507,1509,1514,1516,1521,1523,1528,1530,1535],{"type":706,"value":1508},"Итого: при ",{"type":701,"tag":717,"props":1510,"children":1512},{"className":1511},[],[1513],{"type":706,"value":787},{"type":706,"value":1515}," на действительно необъявленной переменной возвращается строка ",{"type":701,"tag":717,"props":1517,"children":1519},{"className":1518},[],[1520],{"type":706,"value":739},{"type":706,"value":1522}," без ошибки; ",{"type":701,"tag":717,"props":1524,"children":1526},{"className":1525},[],[1527],{"type":706,"value":722},{"type":706,"value":1529}," появляется при обычном обращении к имени или при ",{"type":701,"tag":717,"props":1531,"children":1533},{"className":1532},[],[1534],{"type":706,"value":787},{"type":706,"value":1536}," к переменной в TDZ.",1775735658947]