[{"data":1,"prerenderedAt":1901},["ShallowReactive",2],{"$ftWNT3C_XuBuvWN0ecVexkL5lVhsnFW4iE96_BCiEzLY":3,"$fMMUdSFktwQFqMVGPrTtt3EC5yheBp7PzwIqznamFcMo":118,"$fc0LoAJgqXDLbKKd2JS_NpM4SuzBK8EycUXINSg09CKU":121,"$fM3ea55k6lKMPOTM84llDB26VSQDVVbxiQuSBFQw9P_c":126,"$f1Prj1xEczHja_-L7FyIGgRHd5_cSWHo7r6AE5aheAik":471,"$fI5fDmvm-5tr9wcH0eHaKZa1j3y_FQIQaHHPqbZxAHJE":693,"mdc-rkbq12-key":713,"mdc--tb9ycr-key":725,"mdc--mgy92o-key":767,"mdc--u2d9wy-key":804,"mdc--fiwzvl-key":848,"mdc-czqpw9-key":863,"mdc-xjn390-key":900,"mdc--4rtb0y-key":945,"mdc--24sssu-key":980,"mdc--b8padb-key":1010,"mdc-30b14g-key":1115,"mdc--a0ioyh-key":1446,"mdc--32lc3r-key":1482,"mdc-pkwg11-key":1565,"mdc-ghgdfp-key":1635,"mdc-x6ua3l-key":1677,"mdc-oh7g6y-key":1740,"mdc--yoxdpf-key":1770,"mdc-64mahw-key":1798,"mdc-gicly2-key":1851},{"content":4,"quizQuestionContent":89,"type":108,"pageMeta":109},[5,9,13,16,20,24,27,31,34,37,41,45,48,52,55,59,62,66,69,72,76,79,83,86],{"id":6,"value":7,"isTypeH1":8},"1944","Оператор typeof в JavaScript: что он показывает",true,{"id":10,"value":11,"anchor":12,"isTypeH2":8},"4500","Теория: что именно делает typeof","theory-what-typeof-does",{"id":14,"value":15,"isTypeParagraph":8},"10357","Оператор `typeof` в JavaScript вычисляет выражение и возвращает строку, описывающую категорию типа получившегося значения. Возвращаемый результат всегда имеет тип `string`, даже если проверяется число, объект или функция.\n\nВ JavaScript тип относится к значению, а не к “переменной как коробке”. Поэтому проверка через `typeof` отвечает на вопрос: “какой тип у значения прямо сейчас”, а не “как было объявлено имя”.",{"id":17,"description":18,"titleAlert":19,"isTypeAlertInfo":8},"681","`typeof` является оператором языка. Запись `typeof x` считается обычной формой, а `typeof(x)` работает как применение скобок к выражению.",null,{"id":21,"value":22,"anchor":23,"isTypeH2":8},"4501","Какие строки возвращает typeof","what-strings-typeof-returns",{"id":25,"value":26,"isTypeParagraph":8},"10358","У `typeof` небольшой фиксированный набор строк. На практике чаще всего встречаются `\"undefined\"`, `\"boolean\"`, `\"number\"`, `\"string\"`, `\"object\"`, `\"function\"`. Также используются `\"symbol\"` и `\"bigint\"`.\n\nПримеры:\n\n```\ntypeof undefined; // \"undefined\"\ntypeof true; // \"boolean\"\ntypeof 42; // \"number\"\ntypeof 3.14; // \"number\"\ntypeof NaN; // \"number\"\ntypeof \"text\"; // \"string\"\ntypeof Symbol(\"id\"); // \"symbol\"\ntypeof 10n; // \"bigint\"\ntypeof {}; // \"object\"\ntypeof function(){}; // \"function\"\n```\n\nСледует учитывать, что `typeof` почти не “детализирует” объектные значения. Для большинства объектов (включая массивы и даты) возвращается `\"object\"`.",{"id":28,"value":29,"anchor":30,"isTypeH2":8},"4502","Таблица: значения и результат typeof","value-to-typeof-table",{"id":32,"value":33,"isTypeParagraph":8},"10359","| Значение | Пример | Результат `typeof` |\n|---|---|---|\n| Undefined | `undefined` | `\"undefined\"` |\n| Null | `null` | `\"object\"` |\n| Boolean | `false` | `\"boolean\"` |\n| Number | `0`, `NaN`, `Infinity` | `\"number\"` |\n| String | `\"a\"` | `\"string\"` |\n| BigInt | `1n` | `\"bigint\"` |\n| Symbol | `Symbol()` | `\"symbol\"` |\n| Function | `() => {}` | `\"function\"` |\n| Object | `{}` | `\"object\"` |\n| Array | `[]` | `\"object\"` |\n| Date | `new Date()` | `\"object\"` |",{"id":35,"description":36,"titleAlert":19,"isTypeAlertWarning":8},"741","`typeof null` возвращает `\"object\"`. Это известная историческая особенность JavaScript, поэтому `null` следует проверять отдельно сравнением `value === null`.",{"id":38,"value":39,"anchor":40,"isTypeH2":8},"4503","Типичные ловушки и корректные проверки","common-pitfalls-and-checks",{"id":42,"value":43,"anchor":44,"isTypeH2":8},"4504","Почему массив — это \"object\"","why-array-is-object",{"id":46,"value":47,"isTypeParagraph":8},"10360","Массив в JavaScript является объектом со специальным поведением (числовые индексы, свойство `length`, методы). Поэтому `typeof []` возвращает `\"object\"`, а не отдельный тип `\"array\"`.\n\nПримеры:\n\n`typeof []; // \"object\"`\n`Array.isArray([]); // true`\n`Array.isArray({}); // false`\n\nДля распознавания массива обычно применяется `Array.isArray(value)`, а `typeof` используется как базовая классификация.",{"id":49,"value":50,"anchor":51,"isTypeH2":8},"4505","Почему null дает \"object\"","why-null-is-object",{"id":53,"value":54,"isTypeParagraph":8},"10361","Значение `null` обозначает “нет объектного значения”. Однако из-за старого решения в реализации языка `typeof null` возвращает `\"object\"`, и это поведение сохранено ради совместимости.\n\nПрактическое следствие: проверка “объект ли это” через `typeof value === \"object\"` должна учитывать `null`, иначе `null` будет ошибочно принят за объект.\n\nПример логики проверок:\n\n```\nfunction isObjectLike(value) {\n  if (value === null) return false;\n  return typeof value === \"object\";\n}\n\nisObjectLike(null); // false\nisObjectLike({}); // true\nisObjectLike([]); // true\n```",{"id":56,"value":57,"anchor":58,"isTypeH2":8},"4506","Почему функция — это \"function\"","why-function-is-function",{"id":60,"value":61,"isTypeParagraph":8},"10362","Функции в JavaScript являются объектами (у них есть свойства, прототипные связи), но оператор `typeof` возвращает для них отдельную строку `\"function\"`. Это позволяет удобно проверять “можно ли вызвать”.\n\nПримеры:\n\n`typeof (() => {}); // \"function\"`\n`typeof Math.max; // \"function\"`",{"id":63,"value":64,"anchor":65,"isTypeH2":8},"4507","Проверка необъявленного идентификатора","undeclared-identifier-check",{"id":67,"value":68,"isTypeParagraph":8},"10363","Особенность `typeof` состоит в том, что проверка необъявленного идентификатора не приводит к ошибке `ReferenceError`, а возвращает `\"undefined\"`. Это отличается от прямого чтения такого имени.\n\nПримеры:\n\n`typeof notDeclared; // \"undefined\"`\n\nЕсли попытаться выполнить выражение `notDeclared;`, возникнет `ReferenceError`.",{"id":70,"description":71,"titleAlert":19,"isTypeAlertWarning":8},"742","Проверка `typeof x === \"undefined\"` означает только то, что результат чтения выражения равен `undefined`. Переменная может быть объявлена и намеренно содержать `undefined`.",{"id":73,"value":74,"anchor":75,"isTypeH2":8},"4508","Как мысленно представить работу typeof","mental-model",{"id":77,"value":78,"isTypeParagraph":8},"10364","Удобная модель: сначала вычисляется выражение, затем готовое значение относится к одной из “корзин” типов, после чего возвращается строковая метка.\n\nСхема:\n\n```\n[выражение]\n↓ вычисление\n[значение]\n↓ классификация typeof\n\"undefined\" | \"boolean\" | \"number\" | \"string\" | \"bigint\" | \"symbol\" | \"function\" | \"object\"\n```\n\nВажно, что “object” в этой модели является широкой категорией, в которую попадает много разных структур данных.\n",{"id":80,"value":81,"anchor":82,"isTypeH2":8},"4509","Практические примеры (простые и полезные)","practical-examples",{"id":84,"value":85,"isTypeParagraph":8},"10365","Пример: различение `null`, массива и прочих типов.\n\n```\nfunction describe(value) {\n  if (value === null) return \"null\";\n  if (Array.isArray(value)) return \"array\";\n  return typeof value;\n}\n\ndescribe(null); // \"null\"\ndescribe([]); // \"array\"\ndescribe({}); // \"object\"\ndescribe(10n); // \"bigint\"\ndescribe(() => {}); // \"function\"\n```\n\nПример: грубая проверка “примитив ли это” (без `null`, так как `null` не является примитивом в смысле поведения объектов, но и не ведет себя как объект в реальной работе).\n\n```\nfunction isPrimitive(value) {\n  if (value === null) return false;\n  const t = typeof value;\n  return (\n    t === \"undefined\" ||\n    t === \"boolean\" ||\n    t === \"number\" ||\n    t === \"string\" ||\n    t === \"symbol\" ||\n    t === \"bigint\"\n  );\n}\n\nisPrimitive(1); // true\nisPrimitive(\"x\"); // true\nisPrimitive(undefined); // true\nisPrimitive(null); // false\nisPrimitive({}); // false\nisPrimitive([]); // false\n```",{"id":87,"value":88,"isTypeParagraph":8},"10366","Кратко: `typeof` показывает тип вычисленного значения и возвращает строку из ограниченного набора; `null` и массивы дают `\"object\"`, функции дают `\"function\"`, а проверка необъявленного имени через `typeof` возвращает `\"undefined\"` без ошибки.",{"id":90,"options":91,"hint":105,"solution":106,"description":107},"1173",[92,96,99,102],{"id":93,"label":94,"isCorrect":95},"4836","Оператор `typeof` показывает способ объявления идентификатора в коде и возвращает строку `\"let\"`, `\"const\"` или `\"var\"` в зависимости от записи.",false,{"id":97,"label":98,"isCorrect":95},"4837","Оператор `typeof` показывает точный “класс” объектного значения и возвращает имя конструктора, например `\"Array\"`, `\"Date\"` или `\"Map\"` без дополнительных проверок.",{"id":100,"label":101,"isCorrect":8},"4838","Оператор `typeof` показывает тип вычисленного значения выражения и возвращает строку из фиксированного набора, например `\"number\"`, `\"string\"`, `\"undefined\"`, `\"object\"`.",{"id":103,"label":104,"isCorrect":95},"4839","Оператор `typeof` показывает размер значения в памяти и возвращает число байт для примитивов или длину для строк и массивов.","Для правильного ответа достаточно запомнить: `typeof` возвращает строку с типом значения. Для полноты обычно добавляется уточнение о ловушке `typeof null === \"object\"` и о том, что для массивов `typeof` тоже дает `\"object\"`.","**Правильный ответ: 3** - Оператор `typeof` показывает тип вычисленного значения выражения и возвращает строку из фиксированного набора, например `\"number\"`, `\"string\"`, `\"undefined\"`, `\"object\"`.","Что показывает оператор typeof в JavaScript?","quizQuestion",{"title":107,"description":110,"ogTitle":7,"ogDescription":110,"ogImageUrl":111,"canonical":19,"ogLocale":112,"ogSiteName":113,"ogImageType":114,"ogImageWidth":115,"ogImageHeight":116,"ogType":117,"ogUrl":19},"Что возвращает typeof, какие есть значения, ловушки с null и массивами, примеры проверок и таблица результатов.","/og-image.png","ru_RU","goodwebjob.ru","image_jpeg","1200","630","article",{"siteName":119,"siteUrl":120},"GOOD WEB JOB!","https://goodwebjob.ru",[122],{"label":123,"slug":124,"to":125},"Подготовка к тех.интервью","technical-interview","/technical-interview/where-to-begin",{"navigationList":127,"navigationSublist":135},[128,131],{"path":125,"isActive":95,"name":129,"icon":130,"isNavbarMobileDisabled":8},"С чего начать?","material-symbols:visibility-outline-rounded",{"path":132,"isActive":8,"name":133,"icon":134,"isNavbarMobileDisabled":95},"/technical-interview/tasks","Сборник задач","material-symbols:task-outline",[136,145,172,184,190,330,354,363,369,432,453,459],{"title":137,"list":138,"isOpened":95},"Bash",[139,142],{"name":140,"path":141,"isActive":95},"Дан фрагмент 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":143,"path":144,"isActive":95},"Дан фрагмент 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":146,"list":147,"isOpened":95},"CSS",[148,151,154,157,160,163,166,169],{"name":149,"path":150,"isActive":95},"Дан HTML-код. Какой будет цвет у текста «Some dummy text»?","/technical-interview/tasks/the-html-code-is-given-what-will-be-the-color-of-the-some-dummy-text",{"name":152,"path":153,"isActive":95},"Есть шаблон HTML и CSS кода. Какой будет цвет у текста «Таким образом, постоянное»?","/technical-interview/tasks/there-is-a-template-for-html-and-css-code-what-color-will-the-text-thus-constant-have",{"name":155,"path":156,"isActive":95},"Есть шаблон вложенного 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":158,"path":159,"isActive":95},"Есть шаблон вложенного 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":161,"path":162,"isActive":95},"Есть HTML код. Будет ли font-weight на span влиять?","/technical-interview/tasks/there-is-an-html-code-will-font-weight-affect-span",{"name":164,"path":165,"isActive":95},"Flexbox и Grid, чем отличаются друг от друга?","/technical-interview/tasks/what-are-the-differences-between-flexbox-and-grid",{"name":167,"path":168,"isActive":95},"Заменяют ли Flexbox и Grid друг друга?","/technical-interview/tasks/do-flexbox-and-grid-replace-each-other",{"name":170,"path":171,"isActive":95},"Есть 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":173,"list":174,"isOpened":95},"Git",[175,178,181],{"name":176,"path":177,"isActive":95},"Разрабатывал, взял закоммитил, запушил. Оказалось, что запушил не в ту ветку, точнее, коммит не в ту ветку. Какие действия?","/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":179,"path":180,"isActive":95},"В git есть несколько вариантов слияния веток, какие? Чем отличаются?","/technical-interview/tasks/git-has-several-options-for-merging-branches-which-ones-how-are-they-different",{"name":182,"path":183,"isActive":95},"Какие существуют стратегии ветвления для работы команды? Что это такое?","/technical-interview/tasks/what-are-the-branching-strategies-for-the-team-what-is-it",{"title":185,"list":186,"isOpened":95},"HTML",[187],{"name":188,"path":189,"isActive":95},"Что такое HTML?","/technical-interview/tasks/what-is-html",{"title":191,"list":192,"isOpened":95},"JavaScript",[193,196,199,202,205,208,211,214,217,220,223,226,229,232,235,238,241,244,247,249,252,255,258,261,264,267,270,273,276,279,282,285,288,291,294,297,300,303,306,309,312,315,318,321,324,327],{"name":194,"path":195,"isActive":95},"Какие логические значения в console.log будут получены?","/technical-interview/tasks/prototype-what-logical-values-will-be-received-in-console-log",{"name":197,"path":198,"isActive":95},"Почему опасно писать прямо в прототипы базовых типов?","/technical-interview/tasks/why-is-it-dangerous-to-write-directly-to-the-prototypes-of-basic-types",{"name":200,"path":201,"isActive":95},"Что вернёт следующий код? Object.create(null).hasOwnProperty('toString')","/technical-interview/tasks/what-will-the-following-code-return-object-create-null-has-own-property-to-string",{"name":203,"path":204,"isActive":95},"Какое значение выведет консоль с object.property?","/technical-interview/tasks/what-value-will-the-console-output-with-object-property",{"name":206,"path":207,"isActive":95},"Что выведется в console.log([arr[0](), arr[0]()])?","/technical-interview/tasks/what-will-be-displayed-in-console-log-arr-0-arr-0",{"name":209,"path":210,"isActive":95},"Что выведет console.log в результате выполнения цикла while?","/technical-interview/tasks/what-will-console-log-output-as-a-result-of-executing-the-while-loop",{"name":212,"path":213,"isActive":95},"Есть функция и объект. Напишите все известные вам способы, чтобы вывести в консоли значение 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":215,"path":216,"isActive":95},"Что вернёт метод book.getUpperName()?","/technical-interview/tasks/what-will-the-book-get-upper-name-method-return",{"name":218,"path":219,"isActive":95},"Переменные объявлены следующим образом: a=3; b=«hello»;. Укажите правильное утверждение","/technical-interview/tasks/variables-are-declared-as-follows-specify-the-correct-statement",{"name":221,"path":222,"isActive":95},"Что выведет консоль в случае присвоения свойства массиву по строковому положительному индексу?","/technical-interview/tasks/what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-positive-string-index",{"name":224,"path":225,"isActive":95},"Что выведет консоль в случае присвоения свойства массиву по строковому отрицательному индексу?","/technical-interview/tasks/what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-negative-string-index",{"name":227,"path":228,"isActive":95},"Что выведет консоль в случае удаления элемента массива с помощью оператора delete?","/technical-interview/tasks/what-will-the-console-output-if-an-array-element-is-deleted-using-the-delete-operator",{"name":230,"path":231,"isActive":95},"Что вернёт этот код: typeof (function(){})()","/technical-interview/tasks/what-this-code-will-return-typeof-function",{"name":233,"path":234,"isActive":95},"Что получится в результате передачи объекта как аргумента в функцию и выполнения кода?","/technical-interview/tasks/what-will-happen-when-an-object-is-passed-as-an-argument-to-a-function-and-the-code-is-executed",{"name":236,"path":237,"isActive":95},"Какие способы объявления функции есть в JavaScript?","/technical-interview/tasks/what-are-the-ways-to-declare-a-function-in-javascript",{"name":239,"path":240,"isActive":95},"Что такое this в JavaScript?","/technical-interview/tasks/what-is-this-in-javascript",{"name":242,"path":243,"isActive":95},"Что такое Event Loop, как работает?","/technical-interview/tasks/what-is-an-event-loop-and-how-does-it-work",{"name":245,"path":246,"isActive":95},"Что будет, если вызвать typeof на необъявленной переменной?","/technical-interview/tasks/what-happens-if-you-call-typeof-on-an-undeclared-variable",{"name":107,"path":248,"isActive":95},"/technical-interview/tasks/what-does-the-typeof-operator-show-in-javascript",{"name":250,"path":251,"isActive":95},"Какие типы данных существует в JavaScript?","/technical-interview/tasks/what-types-of-data-exist-in-javascript",{"name":253,"path":254,"isActive":95},"Какую структуру использовать для хранения упорядоченного списка строк в JavaScript?","/technical-interview/tasks/what-is-the-best-structure-to-use-for-storing-an-ordered-list-of-strings-in-javascript",{"name":256,"path":257,"isActive":95},"Что вернет typeof для массива?","/technical-interview/tasks/what-will-typeof-return-for-an-array",{"name":259,"path":260,"isActive":95},"Почему оператор typeof, применённый к массиву, возвращает объект?","/technical-interview/tasks/why-does-the-typeof-operator-applied-to-an-array-return-an-object",{"name":262,"path":263,"isActive":95},"Если нужно хранить список уникальных строк, какую структуру данных выбрать?","/technical-interview/tasks/if-you-need-to-store-a-list-of-unique-strings-which-data-structure-should-i-choose",{"name":265,"path":266,"isActive":95},"Что возвращает typeof для new Set в JavaScript?","/technical-interview/tasks/what-does-typeof-return-for-new-set-in-javascript",{"name":268,"path":269,"isActive":95},"Почему в JavaScript два объекта с одинаковым содержимым при сравнении возвращают false?","/technical-interview/tasks/why-do-two-objects-with-the-same-content-return-false-when-compared-in-javascript",{"name":271,"path":272,"isActive":95},"В чем разница между микро- и макро-тасками в JavaScript?","/technical-interview/tasks/what-is-the-difference-between-micro-and-macro-tasks-in-javascript",{"name":274,"path":275,"isActive":95},"arr.push(0) повлияет на массив так же, как если бы мы выполнили...","/technical-interview/tasks/arr-push-0-will-affect-the-array-in-the-same-way-as-if-we-performed",{"name":277,"path":278,"isActive":95},"Вернуть массив от 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":280,"path":281,"isActive":95},"Дана строка: '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":283,"path":284,"isActive":95},"Дано дерево (вложенный объект), надо найти сумму всех вершин","/technical-interview/tasks/given-a-tree-nested-object-it-is-necessary-to-find-the-sum-of-all-vertices",{"name":286,"path":287,"isActive":95},"Для каждого вложенного объекта нужно добавить свойство 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":289,"path":290,"isActive":95},"Для каждой ветви дерева записать номер вложенности данной ветви","/technical-interview/tasks/for-each-branch-of-the-tree-write-down-the-nesting-number-of-this-branch",{"name":292,"path":293,"isActive":95},"Есть массив, в котором лежат объекты с датами, необходимо отсортировать даты по возрастанию","/technical-interview/tasks/there-is-an-array-containing-objects-with-dates-that-need-to-be-sorted-by-date",{"name":295,"path":296,"isActive":95},"Есть слова в массиве, необходимо определить, состоят ли они из одних и тех же букв","/technical-interview/tasks/there-are-words-in-the-array-it-is-necessary-to-determine-whether-they-consist-of-the-same-letters",{"name":298,"path":299,"isActive":95},"Есть строка, состоящая из разных скобок, необходимо проверить, закрыты ли все","/technical-interview/tasks/there-is-a-string-consisting-of-different-brackets-it-is-necessary-to-check-whether-all-are-closed",{"name":301,"path":302,"isActive":95}," Найти в массиве неповторяющиеся числа","/technical-interview/tasks/find-non-repeating-numbers-in-an-array",{"name":304,"path":305,"isActive":95},"Напишите функцию, который сделает из массива объект","/technical-interview/tasks/write-a-function-that-will-make-an-object-out-of-an-array",{"name":307,"path":308,"isActive":95},"Необходимо проверить, являются ли две строки анаграммами друг друга","/technical-interview/tasks/checks-whether-two-strings-are-anagrams-of-each-other",{"name":310,"path":311,"isActive":95},"Нечётные числа должны отсортироваться по возрастанию, а чётные должны остаться на своих местах","/technical-interview/tasks/odd-numbers-should-be-sorted-in-ascending-order-and-even-numbers-should-remain-in-their-original-positions",{"name":313,"path":314,"isActive":95},"Определить, является ли слово палиндромом","/technical-interview/tasks/determines-whether-a-word-is-a-palindrome",{"name":316,"path":317,"isActive":95},"«Расплющивание» массива","/technical-interview/tasks/flattening-the-array",{"name":319,"path":320,"isActive":95},"Реализовать функцию, принимающую аргументы \"*\", \"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":322,"path":323,"isActive":95},"Сжатие строк","/technical-interview/tasks/string-compression",{"name":325,"path":326,"isActive":95},"Уникализация значений в массиве","/technical-interview/tasks/unifying-values-in-an-array",{"name":328,"path":329,"isActive":95},"Числа от 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":331,"list":332,"isOpened":95},"React",[333,336,339,342,345,348,351],{"name":334,"path":335,"isActive":95},"Для чего нужен React, какие он решает проблемы?","/technical-interview/tasks/what-is-react-used-for-and-what-problems-does-it-solve",{"name":337,"path":338,"isActive":95},"Какой механизм лежит в основе оптимизации обновлений DOM в React?","/technical-interview/tasks/what-is-the-underlying-mechanism-for-optimizing-dom-updates-in-react",{"name":340,"path":341,"isActive":95},"Если убрать в 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":343,"path":344,"isActive":95},"Есть блок кода. Что в реальном DOM изменится после нажатия на кнопку?","/technical-interview/tasks/there-is-a-block-of-code-what-changes-in-the-real-dom-after-clicking-the-button",{"name":346,"path":347,"isActive":95},"Есть код, в котором список и кнопка. Что в реальном 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":349,"path":350,"isActive":95},"Зачем нужен 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":352,"path":353,"isActive":95},"Что мешает организовать централизованное состояние без менеджера состояния? Если организовать состояние механизмами реакта: контекстом, стейтом, в чем проблема? Что менеджеры состояния привносят?","/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":355,"list":356,"isOpened":95},"Алгоритмы",[357,360],{"name":358,"path":359,"isActive":95},"Что такое алгоритмическая сложность?","/technical-interview/tasks/what-is-algorithmic-complexity",{"name":361,"path":362,"isActive":95},"Какая алгоритмическая сложность у \"быстрой сортировки\"?","/technical-interview/tasks/what-is-the-algorithmic-complexity-of-quick-sort",{"title":364,"list":365,"isOpened":95},"Дебаггинг",[366],{"name":367,"path":368,"isActive":95},"Как диагностировать и исправить нежелательное изменение цвета фона по клику на кнопку, если исходный код сайта запутан и недоступен для прямого чтения?","/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":370,"list":371,"isOpened":95},"Компьютерные сети",[372,375,378,381,384,387,390,393,396,399,402,405,408,411,414,417,420,423,426,429],{"name":373,"path":374,"isActive":95},"Как браузер после ввода домена понимает, откуда брать сайт?","/technical-interview/tasks/how-does-the-browser-know-where-to-get-the-website-after-entering-the-domain",{"name":376,"path":377,"isActive":95},"Что такое DNS, как DNS находит нужный IP-адрес?","/technical-interview/tasks/what-is-dns-and-how-does-dns-find-the-correct-ip-address",{"name":379,"path":380,"isActive":95},"Как домен попадает в DNS в таблицу соответствия: домен – ip","/technical-interview/tasks/how-does-a-domain-get-into-the-dns-mapping-table-domain-ip",{"name":382,"path":383,"isActive":95},"Как браузер решает, какое соединение ему открывать, TCP или UDP?","/technical-interview/tasks/how-does-a-browser-decide-whether-to-open-a-tcp-or-udp-connection",{"name":385,"path":386,"isActive":95},"Ключевые отличия TCP и UDP","/technical-interview/tasks/key-differences-between-tcp-and-udp",{"name":388,"path":389,"isActive":95},"\"TCP/IP\" - кем является TCP, а кем IP в данном случае?","/technical-interview/tasks/tcp-ip-who-is-tcp-and-who-is-ip-in-this-case",{"name":391,"path":392,"isActive":95},"Что такое HTTP и из чего состоит?","/technical-interview/tasks/what-is-http-and-what-does-it-consist-of",{"name":394,"path":395,"isActive":95},"Что такое заголовки в HTTP и зачем они нужны?","/technical-interview/tasks/what-are-http-headers-and-why-do-we-need-them",{"name":397,"path":398,"isActive":95},"Что такое параметры в HTTP?","/technical-interview/tasks/what-are-http-parameters",{"name":400,"path":401,"isActive":95},"Где находится HTML-код в структуре HTTP-ответа?","/technical-interview/tasks/where-is-the-html-code-located-in-the-http-response-structure",{"name":403,"path":404,"isActive":95},"Чем отличаются 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":406,"path":407,"isActive":95},"Пользователь авторизован на сайте. Как сервер узнает об этом с последующими другими заходами, что «я – авторизованный пользователь»?","/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":409,"path":410,"isActive":95},"Что такое cookie?","/technical-interview/tasks/what-is-a-cookie",{"name":412,"path":413,"isActive":95},"Кто является инициатором записи cookie в браузере?","/technical-interview/tasks/who-initiates-the-cookie-recording-in-the-browser",{"name":415,"path":416,"isActive":95},"Есть ли возможность с клиента (с браузера) управлять cookie?","/technical-interview/tasks/is-it-possible-to-manage-cookies-from-the-client-browser",{"name":418,"path":419,"isActive":95},"Верно ли утверждение, что злоумышленник, контролирующий роутер и прослушивающий трафик, может получить логины и пароли от сайтов, на которые заходит клиент?","/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":421,"path":422,"isActive":95},"Всё, что идет по HTTPS – оно защищено?","/technical-interview/tasks/is-everything-that-goes-through-https-secure",{"name":424,"path":425,"isActive":95},"Все данные зашифрованы, используется 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":427,"path":428,"isActive":95},"Есть веб-приложение. Помимо 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":430,"path":431,"isActive":95},"Каким способом может выполняться авторизация пользователя на сайте?","/technical-interview/tasks/how-can-a-user-be-authorized-on-a-website",{"title":433,"list":434,"isOpened":95},"Отрисовка в браузере",[435,438,441,444,447,450],{"name":436,"path":437,"isActive":95},"Что происходит, когда 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":439,"path":440,"isActive":95},"Как браузер парсит JavaScript и изображения при рендеринге?","/technical-interview/tasks/how-the-browser-parses-javascript-and-images-when-rendering",{"name":442,"path":443,"isActive":95},"Что в браузере блокирует рендеринг страницы?","/technical-interview/tasks/what-is-blocking-the-page-rendering-in-the-browser",{"name":445,"path":446,"isActive":95},"Что такое DOM в браузере? Что такое CSSOM?","/technical-interview/tasks/what-is-dom-in-a-browser-what-is-cssom",{"name":448,"path":449,"isActive":95},"Что является узлами в DOM?","/technical-interview/tasks/what-are-nodes-in-the-dom",{"name":451,"path":452,"isActive":95},"Из чего состоит CSSOM?","/technical-interview/tasks/what-does-cssom-consist-of",{"title":454,"list":455,"isOpened":95},"Ревью кода",[456],{"name":457,"path":458,"isActive":95},"По каким характеристикам, ревьюер понимает, что данный код - хороший, а этот код - плохой?","/technical-interview/tasks/how-does-a-reviewer-know-which-code-is-good-and-which-code-is-bad",{"title":460,"list":461,"isOpened":95},"Теория вероятности",[462,465,468],{"name":463,"path":464,"isActive":95},"В комнате три человека. Какова вероятность того, что хотя бы двое из них одного пола? То есть два и более.","/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":466,"path":467,"isActive":95},"Есть монета. Ее подбрасывают пять раз подряд. Каждый раз записывается, что выпало - орел или решка. Сколько разных последовательностей орлов и решек может при этом получиться?","/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":469,"path":470,"isActive":95},"Как гарантированно найти лёгкую фальшивую монету среди 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":472},[473,476,478,480,482,485,488,490,492,494,496,498,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,563,565,567,569,571,573,575,577,579,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,666,668,670,672,674,676,678,680,682,683,685,687,689,691],{"name":474,"value":475},"Теоретические задания","theoretical-tasks",{"name":230,"value":477},"what-this-code-will-return-typeof-function",{"name":129,"value":479},"where-to-begin",{"name":197,"value":481},"why-is-it-dangerous-to-write-directly-to-the-prototypes-of-basic-types",{"name":483,"value":484},"Backend","backend",{"name":486,"value":487},"Frontend","frontend",{"name":194,"value":489},"prototype-what-logical-values-will-be-received-in-console-log",{"name":310,"value":491},"odd-numbers-should-be-sorted-in-ascending-order-and-even-numbers-should-remain-in-their-original-positions",{"name":301,"value":493},"find-non-repeating-numbers-in-an-array",{"name":274,"value":495},"arr-push-0-will-affect-the-array-in-the-same-way-as-if-we-performed",{"name":280,"value":497},"the-string-one-two-three-four-five-is-given-it-is-necessary-to-make-a-nested-object-out-of-the-string",{"name":499,"value":500},"Реализовать функцию, похоже как в Jquery","implement-a-function-similar-to-jquery",{"name":286,"value":502},"for-each-nested-object-you-need-to-add-the-level-property-which-is-equal-to-a-number-the-nesting-number",{"name":203,"value":504},"what-value-will-the-console-output-with-object-property",{"name":206,"value":506},"what-will-be-displayed-in-console-log-arr-0-arr-0",{"name":277,"value":508},"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":307,"value":510},"checks-whether-two-strings-are-anagrams-of-each-other",{"name":313,"value":512},"determines-whether-a-word-is-a-palindrome",{"name":292,"value":514},"there-is-an-array-containing-objects-with-dates-that-need-to-be-sorted-by-date",{"name":319,"value":516},"implement-a-function-that-accepts-arguments-1-b-1c-and-the-return-string-1-b-1c",{"name":283,"value":518},"given-a-tree-nested-object-it-is-necessary-to-find-the-sum-of-all-vertices",{"name":289,"value":520},"for-each-branch-of-the-tree-write-down-the-nesting-number-of-this-branch",{"name":295,"value":522},"there-are-words-in-the-array-it-is-necessary-to-determine-whether-they-consist-of-the-same-letters",{"name":328,"value":524},"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":298,"value":526},"there-is-a-string-consisting-of-different-brackets-it-is-necessary-to-check-whether-all-are-closed",{"name":304,"value":528},"write-a-function-that-will-make-an-object-out-of-an-array",{"name":209,"value":530},"what-will-console-log-output-as-a-result-of-executing-the-while-loop",{"name":212,"value":532},"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":224,"value":534},"what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-negative-string-index",{"name":227,"value":536},"what-will-the-console-output-if-an-array-element-is-deleted-using-the-delete-operator",{"name":325,"value":538},"unifying-values-in-an-array",{"name":316,"value":540},"flattening-the-array",{"name":215,"value":542},"what-will-the-book-get-upper-name-method-return",{"name":322,"value":544},"string-compression",{"name":221,"value":546},"what-will-the-console-display-if-a-property-is-assigned-to-an-array-using-a-positive-string-index",{"name":233,"value":548},"what-will-happen-when-an-object-is-passed-as-an-argument-to-a-function-and-the-code-is-executed",{"name":373,"value":550},"how-does-the-browser-know-where-to-get-the-website-after-entering-the-domain",{"name":379,"value":552},"how-does-a-domain-get-into-the-dns-mapping-table-domain-ip",{"name":382,"value":554},"how-does-a-browser-decide-whether-to-open-a-tcp-or-udp-connection",{"name":385,"value":556},"key-differences-between-tcp-and-udp",{"name":388,"value":558},"tcp-ip-who-is-tcp-and-who-is-ip-in-this-case",{"name":391,"value":560},"what-is-http-and-what-does-it-consist-of",{"name":394,"value":562},"what-are-http-headers-and-why-do-we-need-them",{"name":397,"value":564},"what-are-http-parameters",{"name":400,"value":566},"where-is-the-html-code-located-in-the-http-response-structure",{"name":188,"value":568},"what-is-html",{"name":403,"value":570},"what-are-the-differences-between-http-versions-1-0-1-1-2-0-and-3-0",{"name":406,"value":572},"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":409,"value":574},"what-is-a-cookie",{"name":412,"value":576},"who-initiates-the-cookie-recording-in-the-browser",{"name":415,"value":578},"is-it-possible-to-manage-cookies-from-the-client-browser",{"name":580,"value":581},"Лайвкодинг","livecoding",{"name":200,"value":583},"what-will-the-following-code-return-object-create-null-has-own-property-to-string",{"name":421,"value":585},"is-everything-that-goes-through-https-secure",{"name":424,"value":587},"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":427,"value":589},"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":439,"value":591},"how-the-browser-parses-javascript-and-images-when-rendering",{"name":436,"value":593},"what-happens-when-http-sends-html-what-does-the-browser-do-with-this-html-given-that-it-is-valid",{"name":442,"value":595},"what-is-blocking-the-page-rendering-in-the-browser",{"name":445,"value":597},"what-is-dom-in-a-browser-what-is-cssom",{"name":448,"value":599},"what-are-nodes-in-the-dom",{"name":451,"value":601},"what-does-cssom-consist-of",{"name":149,"value":603},"the-html-code-is-given-what-will-be-the-color-of-the-some-dummy-text",{"name":152,"value":605},"there-is-a-template-for-html-and-css-code-what-color-will-the-text-thus-constant-have",{"name":155,"value":607},"there-is-a-template-for-embedded-html-code-what-will-be-the-color-of-the-one-more-dummy-text",{"name":158,"value":609},"there-is-a-template-for-embedded-html-code-will-there-be-a-display-does-bodys-block-affect-span",{"name":161,"value":611},"there-is-an-html-code-will-font-weight-affect-span",{"name":164,"value":613},"what-are-the-differences-between-flexbox-and-grid",{"name":167,"value":615},"do-flexbox-and-grid-replace-each-other",{"name":170,"value":617},"there-are-css-and-js-animations-what-is-the-difference-between-them-and-which-is-faster-and-more-convenient",{"name":133,"value":619},"tasks",{"name":236,"value":621},"what-are-the-ways-to-declare-a-function-in-javascript",{"name":239,"value":623},"what-is-this-in-javascript",{"name":242,"value":625},"what-is-an-event-loop-and-how-does-it-work",{"name":245,"value":627},"what-happens-if-you-call-typeof-on-an-undeclared-variable",{"name":107,"value":629},"what-does-the-typeof-operator-show-in-javascript",{"name":250,"value":631},"what-types-of-data-exist-in-javascript",{"name":253,"value":633},"what-is-the-best-structure-to-use-for-storing-an-ordered-list-of-strings-in-javascript",{"name":256,"value":635},"what-will-typeof-return-for-an-array",{"name":259,"value":637},"why-does-the-typeof-operator-applied-to-an-array-return-an-object",{"name":262,"value":639},"if-you-need-to-store-a-list-of-unique-strings-which-data-structure-should-i-choose",{"name":265,"value":641},"what-does-typeof-return-for-new-set-in-javascript",{"name":334,"value":643},"what-is-react-used-for-and-what-problems-does-it-solve",{"name":340,"value":645},"if-you-remove-the-vdom-fiber-in-react-and-manually-change-the-dom-isn-t-that-optimal",{"name":343,"value":647},"there-is-a-block-of-code-what-changes-in-the-real-dom-after-clicking-the-button",{"name":346,"value":649},"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":349,"value":651},"why-do-we-need-redux-mobx-effector-why-do-we-need-a-state-manager-what-problems-does-it-solve",{"name":367,"value":653},"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":176,"value":655},"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":179,"value":657},"git-has-several-options-for-merging-branches-which-ones-how-are-they-different",{"name":182,"value":659},"what-are-the-branching-strategies-for-the-team-what-is-it",{"name":457,"value":661},"how-does-a-reviewer-know-which-code-is-good-and-which-code-is-bad",{"name":140,"value":663},"here-is-a-fragment-of-a-bash-script-cd-mkdir-foo-what-is-happening-in-this-script",{"name":143,"value":665},"here-is-a-fragment-of-a-bash-script-target-ps-af-grep-1-head-n-1",{"name":358,"value":667},"what-is-algorithmic-complexity",{"name":361,"value":669},"what-is-the-algorithmic-complexity-of-quick-sort",{"name":268,"value":671},"why-do-two-objects-with-the-same-content-return-false-when-compared-in-javascript",{"name":430,"value":673},"how-can-a-user-be-authorized-on-a-website",{"name":271,"value":675},"what-is-the-difference-between-micro-and-macro-tasks-in-javascript",{"name":463,"value":677},"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":466,"value":679},"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":469,"value":681},"how-can-you-guarantee-to-find-an-easy-fake-coin-among-8-in-the-minimum-number-of-weighings-on-a-balance-scale",{"name":123,"value":124},{"name":418,"value":684},"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":376,"value":686},"what-is-dns-and-how-does-dns-find-the-correct-ip-address",{"name":218,"value":688},"variables-are-declared-as-follows-specify-the-correct-statement",{"name":337,"value":690},"what-is-the-underlying-mechanism-for-optimizing-dom-updates-in-react",{"name":352,"value":692},"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":694,"copyright":697,"reportError":698,"socialNetwork":700},{"link":695,"title":696},"https://t.me/baurinanton","Сотрудничество","© “GOOD WEB JOB!”",{"label":699,"link":695},"Сообщить об ошибке",{"label":701,"socialNetworkList":702},"Мы в соцсетях:",[703,706,709],{"icon":19,"link":704,"title":705},"https://max.ru/u/f9LHodD0cOKMaukdnnahTeL5pwvjrPfUaZ4S8_1rsNy9I9qsmc9Ar3kP_y8","Max",{"icon":707,"link":695,"title":708},"ic:baseline-telegram","Telegram",{"icon":710,"link":711,"title":712},"ri:vk-fill","https://vk.com/baurinanton","VK",{"data":714,"body":715},{},{"type":716,"children":717},"root",[718],{"type":719,"tag":720,"props":721,"children":722},"element","p",{},[723],{"type":724,"value":107},"text",{"data":726,"body":727},{},{"type":716,"children":728},[729],{"type":719,"tag":720,"props":730,"children":731},{},[732,734,741,743,749,751,757,759,765],{"type":724,"value":733},"Оператор ",{"type":719,"tag":735,"props":736,"children":738},"code",{"className":737},[],[739],{"type":724,"value":740},"typeof",{"type":724,"value":742}," показывает способ объявления идентификатора в коде и возвращает строку ",{"type":719,"tag":735,"props":744,"children":746},{"className":745},[],[747],{"type":724,"value":748},"\"let\"",{"type":724,"value":750},", ",{"type":719,"tag":735,"props":752,"children":754},{"className":753},[],[755],{"type":724,"value":756},"\"const\"",{"type":724,"value":758}," или ",{"type":719,"tag":735,"props":760,"children":762},{"className":761},[],[763],{"type":724,"value":764},"\"var\"",{"type":724,"value":766}," в зависимости от записи.",{"data":768,"body":769},{},{"type":716,"children":770},[771],{"type":719,"tag":720,"props":772,"children":773},{},[774,775,780,782,788,789,795,796,802],{"type":724,"value":733},{"type":719,"tag":735,"props":776,"children":778},{"className":777},[],[779],{"type":724,"value":740},{"type":724,"value":781}," показывает точный “класс” объектного значения и возвращает имя конструктора, например ",{"type":719,"tag":735,"props":783,"children":785},{"className":784},[],[786],{"type":724,"value":787},"\"Array\"",{"type":724,"value":750},{"type":719,"tag":735,"props":790,"children":792},{"className":791},[],[793],{"type":724,"value":794},"\"Date\"",{"type":724,"value":758},{"type":719,"tag":735,"props":797,"children":799},{"className":798},[],[800],{"type":724,"value":801},"\"Map\"",{"type":724,"value":803}," без дополнительных проверок.",{"data":805,"body":806},{},{"type":716,"children":807},[808],{"type":719,"tag":720,"props":809,"children":810},{},[811,812,817,819,825,826,832,833,839,840,846],{"type":724,"value":733},{"type":719,"tag":735,"props":813,"children":815},{"className":814},[],[816],{"type":724,"value":740},{"type":724,"value":818}," показывает тип вычисленного значения выражения и возвращает строку из фиксированного набора, например ",{"type":719,"tag":735,"props":820,"children":822},{"className":821},[],[823],{"type":724,"value":824},"\"number\"",{"type":724,"value":750},{"type":719,"tag":735,"props":827,"children":829},{"className":828},[],[830],{"type":724,"value":831},"\"string\"",{"type":724,"value":750},{"type":719,"tag":735,"props":834,"children":836},{"className":835},[],[837],{"type":724,"value":838},"\"undefined\"",{"type":724,"value":750},{"type":719,"tag":735,"props":841,"children":843},{"className":842},[],[844],{"type":724,"value":845},"\"object\"",{"type":724,"value":847},".",{"data":849,"body":850},{},{"type":716,"children":851},[852],{"type":719,"tag":720,"props":853,"children":854},{},[855,856,861],{"type":724,"value":733},{"type":719,"tag":735,"props":857,"children":859},{"className":858},[],[860],{"type":724,"value":740},{"type":724,"value":862}," показывает размер значения в памяти и возвращает число байт для примитивов или длину для строк и массивов.",{"data":864,"body":865},{},{"type":716,"children":866},[867],{"type":719,"tag":720,"props":868,"children":869},{},[870,872,877,879,885,887,892,894,899],{"type":724,"value":871},"Для правильного ответа достаточно запомнить: ",{"type":719,"tag":735,"props":873,"children":875},{"className":874},[],[876],{"type":724,"value":740},{"type":724,"value":878}," возвращает строку с типом значения. Для полноты обычно добавляется уточнение о ловушке ",{"type":719,"tag":735,"props":880,"children":882},{"className":881},[],[883],{"type":724,"value":884},"typeof null === \"object\"",{"type":724,"value":886}," и о том, что для массивов ",{"type":719,"tag":735,"props":888,"children":890},{"className":889},[],[891],{"type":724,"value":740},{"type":724,"value":893}," тоже дает ",{"type":719,"tag":735,"props":895,"children":897},{"className":896},[],[898],{"type":724,"value":845},{"type":724,"value":847},{"data":901,"body":902},{},{"type":716,"children":903},[904],{"type":719,"tag":720,"props":905,"children":906},{},[907,913,915,920,921,926,927,932,933,938,939,944],{"type":719,"tag":908,"props":909,"children":910},"strong",{},[911],{"type":724,"value":912},"Правильный ответ: 3",{"type":724,"value":914}," - Оператор ",{"type":719,"tag":735,"props":916,"children":918},{"className":917},[],[919],{"type":724,"value":740},{"type":724,"value":818},{"type":719,"tag":735,"props":922,"children":924},{"className":923},[],[925],{"type":724,"value":824},{"type":724,"value":750},{"type":719,"tag":735,"props":928,"children":930},{"className":929},[],[931],{"type":724,"value":831},{"type":724,"value":750},{"type":719,"tag":735,"props":934,"children":936},{"className":935},[],[937],{"type":724,"value":838},{"type":724,"value":750},{"type":719,"tag":735,"props":940,"children":942},{"className":941},[],[943],{"type":724,"value":845},{"type":724,"value":847},{"data":946,"body":947},{},{"type":716,"children":948},[949,968],{"type":719,"tag":720,"props":950,"children":951},{},[952,953,958,960,966],{"type":724,"value":733},{"type":719,"tag":735,"props":954,"children":956},{"className":955},[],[957],{"type":724,"value":740},{"type":724,"value":959}," в JavaScript вычисляет выражение и возвращает строку, описывающую категорию типа получившегося значения. Возвращаемый результат всегда имеет тип ",{"type":719,"tag":735,"props":961,"children":963},{"className":962},[],[964],{"type":724,"value":965},"string",{"type":724,"value":967},", даже если проверяется число, объект или функция.",{"type":719,"tag":720,"props":969,"children":970},{},[971,973,978],{"type":724,"value":972},"В JavaScript тип относится к значению, а не к “переменной как коробке”. Поэтому проверка через ",{"type":719,"tag":735,"props":974,"children":976},{"className":975},[],[977],{"type":724,"value":740},{"type":724,"value":979}," отвечает на вопрос: “какой тип у значения прямо сейчас”, а не “как было объявлено имя”.",{"data":981,"body":982},{},{"type":716,"children":983},[984],{"type":719,"tag":720,"props":985,"children":986},{},[987,992,994,1000,1002,1008],{"type":719,"tag":735,"props":988,"children":990},{"className":989},[],[991],{"type":724,"value":740},{"type":724,"value":993}," является оператором языка. Запись ",{"type":719,"tag":735,"props":995,"children":997},{"className":996},[],[998],{"type":724,"value":999},"typeof x",{"type":724,"value":1001}," считается обычной формой, а ",{"type":719,"tag":735,"props":1003,"children":1005},{"className":1004},[],[1006],{"type":724,"value":1007},"typeof(x)",{"type":724,"value":1009}," работает как применение скобок к выражению.",{"data":1011,"body":1012},{},{"type":716,"children":1013},[1014,1080,1085,1097],{"type":719,"tag":720,"props":1015,"children":1016},{},[1017,1019,1024,1026,1031,1032,1038,1039,1044,1045,1050,1051,1056,1057,1063,1065,1071,1073,1079],{"type":724,"value":1018},"У ",{"type":719,"tag":735,"props":1020,"children":1022},{"className":1021},[],[1023],{"type":724,"value":740},{"type":724,"value":1025}," небольшой фиксированный набор строк. На практике чаще всего встречаются ",{"type":719,"tag":735,"props":1027,"children":1029},{"className":1028},[],[1030],{"type":724,"value":838},{"type":724,"value":750},{"type":719,"tag":735,"props":1033,"children":1035},{"className":1034},[],[1036],{"type":724,"value":1037},"\"boolean\"",{"type":724,"value":750},{"type":719,"tag":735,"props":1040,"children":1042},{"className":1041},[],[1043],{"type":724,"value":824},{"type":724,"value":750},{"type":719,"tag":735,"props":1046,"children":1048},{"className":1047},[],[1049],{"type":724,"value":831},{"type":724,"value":750},{"type":719,"tag":735,"props":1052,"children":1054},{"className":1053},[],[1055],{"type":724,"value":845},{"type":724,"value":750},{"type":719,"tag":735,"props":1058,"children":1060},{"className":1059},[],[1061],{"type":724,"value":1062},"\"function\"",{"type":724,"value":1064},". Также используются ",{"type":719,"tag":735,"props":1066,"children":1068},{"className":1067},[],[1069],{"type":724,"value":1070},"\"symbol\"",{"type":724,"value":1072}," и ",{"type":719,"tag":735,"props":1074,"children":1076},{"className":1075},[],[1077],{"type":724,"value":1078},"\"bigint\"",{"type":724,"value":847},{"type":719,"tag":720,"props":1081,"children":1082},{},[1083],{"type":724,"value":1084},"Примеры:",{"type":719,"tag":1086,"props":1087,"children":1091},"pre",{"className":1088,"code":1090,"language":724},[1089],"language-text","typeof undefined; // \"undefined\"\ntypeof true; // \"boolean\"\ntypeof 42; // \"number\"\ntypeof 3.14; // \"number\"\ntypeof NaN; // \"number\"\ntypeof \"text\"; // \"string\"\ntypeof Symbol(\"id\"); // \"symbol\"\ntypeof 10n; // \"bigint\"\ntypeof {}; // \"object\"\ntypeof function(){}; // \"function\"\n",[1092],{"type":719,"tag":735,"props":1093,"children":1095},{"__ignoreMap":1094},"",[1096],{"type":724,"value":1090},{"type":719,"tag":720,"props":1098,"children":1099},{},[1100,1102,1107,1109,1114],{"type":724,"value":1101},"Следует учитывать, что ",{"type":719,"tag":735,"props":1103,"children":1105},{"className":1104},[],[1106],{"type":724,"value":740},{"type":724,"value":1108}," почти не “детализирует” объектные значения. Для большинства объектов (включая массивы и даты) возвращается ",{"type":719,"tag":735,"props":1110,"children":1112},{"className":1111},[],[1113],{"type":724,"value":845},{"type":724,"value":847},{"data":1116,"body":1117},{},{"type":716,"children":1118},[1119],{"type":719,"tag":1120,"props":1121,"children":1122},"table",{},[1123,1152],{"type":719,"tag":1124,"props":1125,"children":1126},"thead",{},[1127],{"type":719,"tag":1128,"props":1129,"children":1130},"tr",{},[1131,1137,1142],{"type":719,"tag":1132,"props":1133,"children":1134},"th",{},[1135],{"type":724,"value":1136},"Значение",{"type":719,"tag":1132,"props":1138,"children":1139},{},[1140],{"type":724,"value":1141},"Пример",{"type":719,"tag":1132,"props":1143,"children":1144},{},[1145,1147],{"type":724,"value":1146},"Результат ",{"type":719,"tag":735,"props":1148,"children":1150},{"className":1149},[],[1151],{"type":724,"value":740},{"type":719,"tag":1153,"props":1154,"children":1155},"tbody",{},[1156,1182,1207,1232,1271,1296,1321,1346,1371,1396,1421],{"type":719,"tag":1128,"props":1157,"children":1158},{},[1159,1165,1174],{"type":719,"tag":1160,"props":1161,"children":1162},"td",{},[1163],{"type":724,"value":1164},"Undefined",{"type":719,"tag":1160,"props":1166,"children":1167},{},[1168],{"type":719,"tag":735,"props":1169,"children":1171},{"className":1170},[],[1172],{"type":724,"value":1173},"undefined",{"type":719,"tag":1160,"props":1175,"children":1176},{},[1177],{"type":719,"tag":735,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":724,"value":838},{"type":719,"tag":1128,"props":1183,"children":1184},{},[1185,1190,1199],{"type":719,"tag":1160,"props":1186,"children":1187},{},[1188],{"type":724,"value":1189},"Null",{"type":719,"tag":1160,"props":1191,"children":1192},{},[1193],{"type":719,"tag":735,"props":1194,"children":1196},{"className":1195},[],[1197],{"type":724,"value":1198},"null",{"type":719,"tag":1160,"props":1200,"children":1201},{},[1202],{"type":719,"tag":735,"props":1203,"children":1205},{"className":1204},[],[1206],{"type":724,"value":845},{"type":719,"tag":1128,"props":1208,"children":1209},{},[1210,1215,1224],{"type":719,"tag":1160,"props":1211,"children":1212},{},[1213],{"type":724,"value":1214},"Boolean",{"type":719,"tag":1160,"props":1216,"children":1217},{},[1218],{"type":719,"tag":735,"props":1219,"children":1221},{"className":1220},[],[1222],{"type":724,"value":1223},"false",{"type":719,"tag":1160,"props":1225,"children":1226},{},[1227],{"type":719,"tag":735,"props":1228,"children":1230},{"className":1229},[],[1231],{"type":724,"value":1037},{"type":719,"tag":1128,"props":1233,"children":1234},{},[1235,1240,1263],{"type":719,"tag":1160,"props":1236,"children":1237},{},[1238],{"type":724,"value":1239},"Number",{"type":719,"tag":1160,"props":1241,"children":1242},{},[1243,1249,1250,1256,1257],{"type":719,"tag":735,"props":1244,"children":1246},{"className":1245},[],[1247],{"type":724,"value":1248},"0",{"type":724,"value":750},{"type":719,"tag":735,"props":1251,"children":1253},{"className":1252},[],[1254],{"type":724,"value":1255},"NaN",{"type":724,"value":750},{"type":719,"tag":735,"props":1258,"children":1260},{"className":1259},[],[1261],{"type":724,"value":1262},"Infinity",{"type":719,"tag":1160,"props":1264,"children":1265},{},[1266],{"type":719,"tag":735,"props":1267,"children":1269},{"className":1268},[],[1270],{"type":724,"value":824},{"type":719,"tag":1128,"props":1272,"children":1273},{},[1274,1279,1288],{"type":719,"tag":1160,"props":1275,"children":1276},{},[1277],{"type":724,"value":1278},"String",{"type":719,"tag":1160,"props":1280,"children":1281},{},[1282],{"type":719,"tag":735,"props":1283,"children":1285},{"className":1284},[],[1286],{"type":724,"value":1287},"\"a\"",{"type":719,"tag":1160,"props":1289,"children":1290},{},[1291],{"type":719,"tag":735,"props":1292,"children":1294},{"className":1293},[],[1295],{"type":724,"value":831},{"type":719,"tag":1128,"props":1297,"children":1298},{},[1299,1304,1313],{"type":719,"tag":1160,"props":1300,"children":1301},{},[1302],{"type":724,"value":1303},"BigInt",{"type":719,"tag":1160,"props":1305,"children":1306},{},[1307],{"type":719,"tag":735,"props":1308,"children":1310},{"className":1309},[],[1311],{"type":724,"value":1312},"1n",{"type":719,"tag":1160,"props":1314,"children":1315},{},[1316],{"type":719,"tag":735,"props":1317,"children":1319},{"className":1318},[],[1320],{"type":724,"value":1078},{"type":719,"tag":1128,"props":1322,"children":1323},{},[1324,1329,1338],{"type":719,"tag":1160,"props":1325,"children":1326},{},[1327],{"type":724,"value":1328},"Symbol",{"type":719,"tag":1160,"props":1330,"children":1331},{},[1332],{"type":719,"tag":735,"props":1333,"children":1335},{"className":1334},[],[1336],{"type":724,"value":1337},"Symbol()",{"type":719,"tag":1160,"props":1339,"children":1340},{},[1341],{"type":719,"tag":735,"props":1342,"children":1344},{"className":1343},[],[1345],{"type":724,"value":1070},{"type":719,"tag":1128,"props":1347,"children":1348},{},[1349,1354,1363],{"type":719,"tag":1160,"props":1350,"children":1351},{},[1352],{"type":724,"value":1353},"Function",{"type":719,"tag":1160,"props":1355,"children":1356},{},[1357],{"type":719,"tag":735,"props":1358,"children":1360},{"className":1359},[],[1361],{"type":724,"value":1362},"() => {}",{"type":719,"tag":1160,"props":1364,"children":1365},{},[1366],{"type":719,"tag":735,"props":1367,"children":1369},{"className":1368},[],[1370],{"type":724,"value":1062},{"type":719,"tag":1128,"props":1372,"children":1373},{},[1374,1379,1388],{"type":719,"tag":1160,"props":1375,"children":1376},{},[1377],{"type":724,"value":1378},"Object",{"type":719,"tag":1160,"props":1380,"children":1381},{},[1382],{"type":719,"tag":735,"props":1383,"children":1385},{"className":1384},[],[1386],{"type":724,"value":1387},"{}",{"type":719,"tag":1160,"props":1389,"children":1390},{},[1391],{"type":719,"tag":735,"props":1392,"children":1394},{"className":1393},[],[1395],{"type":724,"value":845},{"type":719,"tag":1128,"props":1397,"children":1398},{},[1399,1404,1413],{"type":719,"tag":1160,"props":1400,"children":1401},{},[1402],{"type":724,"value":1403},"Array",{"type":719,"tag":1160,"props":1405,"children":1406},{},[1407],{"type":719,"tag":735,"props":1408,"children":1410},{"className":1409},[],[1411],{"type":724,"value":1412},"[]",{"type":719,"tag":1160,"props":1414,"children":1415},{},[1416],{"type":719,"tag":735,"props":1417,"children":1419},{"className":1418},[],[1420],{"type":724,"value":845},{"type":719,"tag":1128,"props":1422,"children":1423},{},[1424,1429,1438],{"type":719,"tag":1160,"props":1425,"children":1426},{},[1427],{"type":724,"value":1428},"Date",{"type":719,"tag":1160,"props":1430,"children":1431},{},[1432],{"type":719,"tag":735,"props":1433,"children":1435},{"className":1434},[],[1436],{"type":724,"value":1437},"new Date()",{"type":719,"tag":1160,"props":1439,"children":1440},{},[1441],{"type":719,"tag":735,"props":1442,"children":1444},{"className":1443},[],[1445],{"type":724,"value":845},{"data":1447,"body":1448},{},{"type":716,"children":1449},[1450],{"type":719,"tag":720,"props":1451,"children":1452},{},[1453,1459,1461,1466,1468,1473,1475,1481],{"type":719,"tag":735,"props":1454,"children":1456},{"className":1455},[],[1457],{"type":724,"value":1458},"typeof null",{"type":724,"value":1460}," возвращает ",{"type":719,"tag":735,"props":1462,"children":1464},{"className":1463},[],[1465],{"type":724,"value":845},{"type":724,"value":1467},". Это известная историческая особенность JavaScript, поэтому ",{"type":719,"tag":735,"props":1469,"children":1471},{"className":1470},[],[1472],{"type":724,"value":1198},{"type":724,"value":1474}," следует проверять отдельно сравнением ",{"type":719,"tag":735,"props":1476,"children":1478},{"className":1477},[],[1479],{"type":724,"value":1480},"value === null",{"type":724,"value":847},{"data":1483,"body":1484},{},{"type":716,"children":1485},[1486,1520,1524,1545],{"type":719,"tag":720,"props":1487,"children":1488},{},[1489,1491,1497,1499,1505,1506,1511,1513,1519],{"type":724,"value":1490},"Массив в JavaScript является объектом со специальным поведением (числовые индексы, свойство ",{"type":719,"tag":735,"props":1492,"children":1494},{"className":1493},[],[1495],{"type":724,"value":1496},"length",{"type":724,"value":1498},", методы). Поэтому ",{"type":719,"tag":735,"props":1500,"children":1502},{"className":1501},[],[1503],{"type":724,"value":1504},"typeof []",{"type":724,"value":1460},{"type":719,"tag":735,"props":1507,"children":1509},{"className":1508},[],[1510],{"type":724,"value":845},{"type":724,"value":1512},", а не отдельный тип ",{"type":719,"tag":735,"props":1514,"children":1516},{"className":1515},[],[1517],{"type":724,"value":1518},"\"array\"",{"type":724,"value":847},{"type":719,"tag":720,"props":1521,"children":1522},{},[1523],{"type":724,"value":1084},{"type":719,"tag":720,"props":1525,"children":1526},{},[1527,1533,1539],{"type":719,"tag":735,"props":1528,"children":1530},{"className":1529},[],[1531],{"type":724,"value":1532},"typeof []; // \"object\"",{"type":719,"tag":735,"props":1534,"children":1536},{"className":1535},[],[1537],{"type":724,"value":1538},"Array.isArray([]); // true",{"type":719,"tag":735,"props":1540,"children":1542},{"className":1541},[],[1543],{"type":724,"value":1544},"Array.isArray({}); // false",{"type":719,"tag":720,"props":1546,"children":1547},{},[1548,1550,1556,1558,1563],{"type":724,"value":1549},"Для распознавания массива обычно применяется ",{"type":719,"tag":735,"props":1551,"children":1553},{"className":1552},[],[1554],{"type":724,"value":1555},"Array.isArray(value)",{"type":724,"value":1557},", а ",{"type":719,"tag":735,"props":1559,"children":1561},{"className":1560},[],[1562],{"type":724,"value":740},{"type":724,"value":1564}," используется как базовая классификация.",{"data":1566,"body":1567},{},{"type":716,"children":1568},[1569,1594,1621,1626],{"type":719,"tag":720,"props":1570,"children":1571},{},[1572,1574,1579,1581,1586,1587,1592],{"type":724,"value":1573},"Значение ",{"type":719,"tag":735,"props":1575,"children":1577},{"className":1576},[],[1578],{"type":724,"value":1198},{"type":724,"value":1580}," обозначает “нет объектного значения”. Однако из-за старого решения в реализации языка ",{"type":719,"tag":735,"props":1582,"children":1584},{"className":1583},[],[1585],{"type":724,"value":1458},{"type":724,"value":1460},{"type":719,"tag":735,"props":1588,"children":1590},{"className":1589},[],[1591],{"type":724,"value":845},{"type":724,"value":1593},", и это поведение сохранено ради совместимости.",{"type":719,"tag":720,"props":1595,"children":1596},{},[1597,1599,1605,1607,1612,1614,1619],{"type":724,"value":1598},"Практическое следствие: проверка “объект ли это” через ",{"type":719,"tag":735,"props":1600,"children":1602},{"className":1601},[],[1603],{"type":724,"value":1604},"typeof value === \"object\"",{"type":724,"value":1606}," должна учитывать ",{"type":719,"tag":735,"props":1608,"children":1610},{"className":1609},[],[1611],{"type":724,"value":1198},{"type":724,"value":1613},", иначе ",{"type":719,"tag":735,"props":1615,"children":1617},{"className":1616},[],[1618],{"type":724,"value":1198},{"type":724,"value":1620}," будет ошибочно принят за объект.",{"type":719,"tag":720,"props":1622,"children":1623},{},[1624],{"type":724,"value":1625},"Пример логики проверок:",{"type":719,"tag":1086,"props":1627,"children":1630},{"className":1628,"code":1629,"language":724},[1089],"function isObjectLike(value) {\n  if (value === null) return false;\n  return typeof value === \"object\";\n}\n\nisObjectLike(null); // false\nisObjectLike({}); // true\nisObjectLike([]); // true\n",[1631],{"type":719,"tag":735,"props":1632,"children":1633},{"__ignoreMap":1094},[1634],{"type":724,"value":1629},{"data":1636,"body":1637},{},{"type":716,"children":1638},[1639,1658,1662],{"type":719,"tag":720,"props":1640,"children":1641},{},[1642,1644,1649,1651,1656],{"type":724,"value":1643},"Функции в JavaScript являются объектами (у них есть свойства, прототипные связи), но оператор ",{"type":719,"tag":735,"props":1645,"children":1647},{"className":1646},[],[1648],{"type":724,"value":740},{"type":724,"value":1650}," возвращает для них отдельную строку ",{"type":719,"tag":735,"props":1652,"children":1654},{"className":1653},[],[1655],{"type":724,"value":1062},{"type":724,"value":1657},". Это позволяет удобно проверять “можно ли вызвать”.",{"type":719,"tag":720,"props":1659,"children":1660},{},[1661],{"type":724,"value":1084},{"type":719,"tag":720,"props":1663,"children":1664},{},[1665,1671],{"type":719,"tag":735,"props":1666,"children":1668},{"className":1667},[],[1669],{"type":724,"value":1670},"typeof (() => {}); // \"function\"",{"type":719,"tag":735,"props":1672,"children":1674},{"className":1673},[],[1675],{"type":724,"value":1676},"typeof Math.max; // \"function\"",{"data":1678,"body":1679},{},{"type":716,"children":1680},[1681,1708,1712,1721],{"type":719,"tag":720,"props":1682,"children":1683},{},[1684,1686,1691,1693,1699,1701,1706],{"type":724,"value":1685},"Особенность ",{"type":719,"tag":735,"props":1687,"children":1689},{"className":1688},[],[1690],{"type":724,"value":740},{"type":724,"value":1692}," состоит в том, что проверка необъявленного идентификатора не приводит к ошибке ",{"type":719,"tag":735,"props":1694,"children":1696},{"className":1695},[],[1697],{"type":724,"value":1698},"ReferenceError",{"type":724,"value":1700},", а возвращает ",{"type":719,"tag":735,"props":1702,"children":1704},{"className":1703},[],[1705],{"type":724,"value":838},{"type":724,"value":1707},". Это отличается от прямого чтения такого имени.",{"type":719,"tag":720,"props":1709,"children":1710},{},[1711],{"type":724,"value":1084},{"type":719,"tag":720,"props":1713,"children":1714},{},[1715],{"type":719,"tag":735,"props":1716,"children":1718},{"className":1717},[],[1719],{"type":724,"value":1720},"typeof notDeclared; // \"undefined\"",{"type":719,"tag":720,"props":1722,"children":1723},{},[1724,1726,1732,1734,1739],{"type":724,"value":1725},"Если попытаться выполнить выражение ",{"type":719,"tag":735,"props":1727,"children":1729},{"className":1728},[],[1730],{"type":724,"value":1731},"notDeclared;",{"type":724,"value":1733},", возникнет ",{"type":719,"tag":735,"props":1735,"children":1737},{"className":1736},[],[1738],{"type":724,"value":1698},{"type":724,"value":847},{"data":1741,"body":1742},{},{"type":716,"children":1743},[1744],{"type":719,"tag":720,"props":1745,"children":1746},{},[1747,1749,1755,1757,1762,1764,1769],{"type":724,"value":1748},"Проверка ",{"type":719,"tag":735,"props":1750,"children":1752},{"className":1751},[],[1753],{"type":724,"value":1754},"typeof x === \"undefined\"",{"type":724,"value":1756}," означает только то, что результат чтения выражения равен ",{"type":719,"tag":735,"props":1758,"children":1760},{"className":1759},[],[1761],{"type":724,"value":1173},{"type":724,"value":1763},". Переменная может быть объявлена и намеренно содержать ",{"type":719,"tag":735,"props":1765,"children":1767},{"className":1766},[],[1768],{"type":724,"value":1173},{"type":724,"value":847},{"data":1771,"body":1772},{},{"type":716,"children":1773},[1774,1779,1784,1793],{"type":719,"tag":720,"props":1775,"children":1776},{},[1777],{"type":724,"value":1778},"Удобная модель: сначала вычисляется выражение, затем готовое значение относится к одной из “корзин” типов, после чего возвращается строковая метка.",{"type":719,"tag":720,"props":1780,"children":1781},{},[1782],{"type":724,"value":1783},"Схема:",{"type":719,"tag":1086,"props":1785,"children":1788},{"className":1786,"code":1787,"language":724},[1089],"[выражение]\n↓ вычисление\n[значение]\n↓ классификация typeof\n\"undefined\" | \"boolean\" | \"number\" | \"string\" | \"bigint\" | \"symbol\" | \"function\" | \"object\"\n",[1789],{"type":719,"tag":735,"props":1790,"children":1791},{"__ignoreMap":1094},[1792],{"type":724,"value":1787},{"type":719,"tag":720,"props":1794,"children":1795},{},[1796],{"type":724,"value":1797},"Важно, что “object” в этой модели является широкой категорией, в которую попадает много разных структур данных.",{"data":1799,"body":1800},{},{"type":716,"children":1801},[1802,1814,1823,1842],{"type":719,"tag":720,"props":1803,"children":1804},{},[1805,1807,1812],{"type":724,"value":1806},"Пример: различение ",{"type":719,"tag":735,"props":1808,"children":1810},{"className":1809},[],[1811],{"type":724,"value":1198},{"type":724,"value":1813},", массива и прочих типов.",{"type":719,"tag":1086,"props":1815,"children":1818},{"className":1816,"code":1817,"language":724},[1089],"function describe(value) {\n  if (value === null) return \"null\";\n  if (Array.isArray(value)) return \"array\";\n  return typeof value;\n}\n\ndescribe(null); // \"null\"\ndescribe([]); // \"array\"\ndescribe({}); // \"object\"\ndescribe(10n); // \"bigint\"\ndescribe(() => {}); // \"function\"\n",[1819],{"type":719,"tag":735,"props":1820,"children":1821},{"__ignoreMap":1094},[1822],{"type":724,"value":1817},{"type":719,"tag":720,"props":1824,"children":1825},{},[1826,1828,1833,1835,1840],{"type":724,"value":1827},"Пример: грубая проверка “примитив ли это” (без ",{"type":719,"tag":735,"props":1829,"children":1831},{"className":1830},[],[1832],{"type":724,"value":1198},{"type":724,"value":1834},", так как ",{"type":719,"tag":735,"props":1836,"children":1838},{"className":1837},[],[1839],{"type":724,"value":1198},{"type":724,"value":1841}," не является примитивом в смысле поведения объектов, но и не ведет себя как объект в реальной работе).",{"type":719,"tag":1086,"props":1843,"children":1846},{"className":1844,"code":1845,"language":724},[1089],"function isPrimitive(value) {\n  if (value === null) return false;\n  const t = typeof value;\n  return (\n    t === \"undefined\" ||\n    t === \"boolean\" ||\n    t === \"number\" ||\n    t === \"string\" ||\n    t === \"symbol\" ||\n    t === \"bigint\"\n  );\n}\n\nisPrimitive(1); // true\nisPrimitive(\"x\"); // true\nisPrimitive(undefined); // true\nisPrimitive(null); // false\nisPrimitive({}); // false\nisPrimitive([]); // false\n",[1847],{"type":719,"tag":735,"props":1848,"children":1849},{"__ignoreMap":1094},[1850],{"type":724,"value":1845},{"data":1852,"body":1853},{},{"type":716,"children":1854},[1855],{"type":719,"tag":720,"props":1856,"children":1857},{},[1858,1860,1865,1867,1872,1874,1879,1881,1886,1888,1893,1894,1899],{"type":724,"value":1859},"Кратко: ",{"type":719,"tag":735,"props":1861,"children":1863},{"className":1862},[],[1864],{"type":724,"value":740},{"type":724,"value":1866}," показывает тип вычисленного значения и возвращает строку из ограниченного набора; ",{"type":719,"tag":735,"props":1868,"children":1870},{"className":1869},[],[1871],{"type":724,"value":1198},{"type":724,"value":1873}," и массивы дают ",{"type":719,"tag":735,"props":1875,"children":1877},{"className":1876},[],[1878],{"type":724,"value":845},{"type":724,"value":1880},", функции дают ",{"type":719,"tag":735,"props":1882,"children":1884},{"className":1883},[],[1885],{"type":724,"value":1062},{"type":724,"value":1887},", а проверка необъявленного имени через ",{"type":719,"tag":735,"props":1889,"children":1891},{"className":1890},[],[1892],{"type":724,"value":740},{"type":724,"value":1460},{"type":719,"tag":735,"props":1895,"children":1897},{"className":1896},[],[1898],{"type":724,"value":838},{"type":724,"value":1900}," без ошибки.",1775735661817]