{"action":"created","comment":{"url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/comments/282517086","pull_request_review_id":235616861,"id":282517086,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4MjUxNzA4Ng==","diff_hunk":"@@ -179,33 +179,33 @@ let user = {\n alert( {}.toString.call(user) ); // [object User]\n ```\n \n-For most environment-specific objects, there is such a property. Here are few browser specific examples:\n+Такое свойство есть у большей части объектов, специфичных для определённых окружений. Вот несколько примеров для браузера:\n \n ```js run\n-// toStringTag for the envinronment-specific object and class:\n+// toStringTag для объекта и класса специфичных для окружения:\n alert( window[Symbol.toStringTag]); // window\n alert( XMLHttpRequest.prototype[Symbol.toStringTag] ); // XMLHttpRequest\n \n alert( {}.toString.call(window) ); // [object Window]\n alert( {}.toString.call(new XMLHttpRequest()) ); // [object XMLHttpRequest]\n ```\n \n-As you can see, the result is exactly `Symbol.toStringTag` (if exists), wrapped into `[object ...]`.\n+Как вы можете видеть, вывод `Symbol.toStringTag` (если он имеется) точно также обёрнут в `[object ...]`.\n \n-At the end we have \"typeof on steroids\" that not only works for primitive data types, but also for built-in objects and even can be customized.\n+В завершение мы имеем \"typeof на стероидах\", который не только работает с примитивными типами данных, но также и со встроенными объектами, и даже быть настроен.\n \n-It can be used instead of `instanceof` for built-in objects when we want to get the type as a string rather than just to check.\n+Он может использоваться вместо `instanceof` для встроенных объектов, когда мы хотим получить тип как строку, нежели просто делать проверку.\n \n-## Summary\n+## Итого\n \n-Let's recap the type-checking methods that we know:\n+Давайте вспомним, какие методы для проверки типа мы знаем: \n \n-|               | works for   |  returns      |\n-|---------------|-------------|---------------|\n-| `typeof`      | primitives  |  string       |\n-| `{}.toString` | primitives, built-in objects, objects with `Symbol.toStringTag`   |       string |\n-| `instanceof`  | objects     |  true/false   |\n+|               | работает для   |  возвращает      |\n+|---------------|----------------|------------------|\n+| `typeof`      | примитивы      |  строка          |\n+| `{}.toString` | примитивы, встроенные объекты, объекты с `Symbol.toStringTag`   |       строка |\n+| `instanceof`  | объекты        |  true/false      |\n \n-As we can see, `{}.toString` is technically a \"more advanced\" `typeof`.\n+Как мы можем видеть, технически `{}.toString` \"более продвинут\", чем `typeof`.\n \n-And `instanceof` operator really shines when we are working with a class hierarchy and want to check for the class taking into account inheritance.\n+И оператор `instanceof` действительно сияет, когда мы работаем с иерархией классов и хотим делать проверки с учётом наследования.","path":"1-js/09-classes/06-instanceof/article.md","position":265,"original_position":265,"commit_id":"30a7388692ca8740cf1c59d9172395544ade0349","original_commit_id":"30a7388692ca8740cf1c59d9172395544ade0349","user":{"login":"iliakan","id":349336,"node_id":"MDQ6VXNlcjM0OTMzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/349336?v=4","gravatar_id":"","url":"https://api.github.com/users/iliakan","html_url":"https://github.com/iliakan","followers_url":"https://api.github.com/users/iliakan/followers","following_url":"https://api.github.com/users/iliakan/following{/other_user}","gists_url":"https://api.github.com/users/iliakan/gists{/gist_id}","starred_url":"https://api.github.com/users/iliakan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iliakan/subscriptions","organizations_url":"https://api.github.com/users/iliakan/orgs","repos_url":"https://api.github.com/users/iliakan/repos","events_url":"https://api.github.com/users/iliakan/events{/privacy}","received_events_url":"https://api.github.com/users/iliakan/received_events","type":"User","site_admin":false},"body":"А оператор `instanceof` - отличный выбор, когда мы работаем с иерархией классов и хотим делать проверки с учётом наследования.","created_at":"2019-05-09T14:39:40Z","updated_at":"2019-05-09T14:39:50Z","html_url":"https://github.com/javascript-tutorial/ru.javascript.info/pull/144#discussion_r282517086","pull_request_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/comments/282517086"},"html":{"href":"https://github.com/javascript-tutorial/ru.javascript.info/pull/144#discussion_r282517086"},"pull_request":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144","id":276000336,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc2MDAwMzM2","html_url":"https://github.com/javascript-tutorial/ru.javascript.info/pull/144","diff_url":"https://github.com/javascript-tutorial/ru.javascript.info/pull/144.diff","patch_url":"https://github.com/javascript-tutorial/ru.javascript.info/pull/144.patch","issue_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/issues/144","number":144,"state":"open","locked":false,"title":"1 js/09 classes/06 instanceof","user":{"login":"GordonDrop","id":5079904,"node_id":"MDQ6VXNlcjUwNzk5MDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5079904?v=4","gravatar_id":"","url":"https://api.github.com/users/GordonDrop","html_url":"https://github.com/GordonDrop","followers_url":"https://api.github.com/users/GordonDrop/followers","following_url":"https://api.github.com/users/GordonDrop/following{/other_user}","gists_url":"https://api.github.com/users/GordonDrop/gists{/gist_id}","starred_url":"https://api.github.com/users/GordonDrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordonDrop/subscriptions","organizations_url":"https://api.github.com/users/GordonDrop/orgs","repos_url":"https://api.github.com/users/GordonDrop/repos","events_url":"https://api.github.com/users/GordonDrop/events{/privacy}","received_events_url":"https://api.github.com/users/GordonDrop/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-05-05T14:20:40Z","updated_at":"2019-05-09T14:39:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"917a75e9b58bd67edd3575aa9b02ee31d026222b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1318652675,"node_id":"MDU6TGFiZWwxMzE4NjUyNjc1","url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/labels/needs%20+1","name":"needs +1","color":"c92458","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144/commits","review_comments_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144/comments","review_comment_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/issues/144/comments","statuses_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/statuses/30a7388692ca8740cf1c59d9172395544ade0349","head":{"label":"GordonDrop:1-js/09-classes/06-instanceof","ref":"1-js/09-classes/06-instanceof","sha":"30a7388692ca8740cf1c59d9172395544ade0349","user":{"login":"GordonDrop","id":5079904,"node_id":"MDQ6VXNlcjUwNzk5MDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5079904?v=4","gravatar_id":"","url":"https://api.github.com/users/GordonDrop","html_url":"https://github.com/GordonDrop","followers_url":"https://api.github.com/users/GordonDrop/followers","following_url":"https://api.github.com/users/GordonDrop/following{/other_user}","gists_url":"https://api.github.com/users/GordonDrop/gists{/gist_id}","starred_url":"https://api.github.com/users/GordonDrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordonDrop/subscriptions","organizations_url":"https://api.github.com/users/GordonDrop/orgs","repos_url":"https://api.github.com/users/GordonDrop/repos","events_url":"https://api.github.com/users/GordonDrop/events{/privacy}","received_events_url":"https://api.github.com/users/GordonDrop/received_events","type":"User","site_admin":false},"repo":{"id":183075740,"node_id":"MDEwOlJlcG9zaXRvcnkxODMwNzU3NDA=","name":"ru.javascript.info","full_name":"GordonDrop/ru.javascript.info","private":false,"owner":{"login":"GordonDrop","id":5079904,"node_id":"MDQ6VXNlcjUwNzk5MDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5079904?v=4","gravatar_id":"","url":"https://api.github.com/users/GordonDrop","html_url":"https://github.com/GordonDrop","followers_url":"https://api.github.com/users/GordonDrop/followers","following_url":"https://api.github.com/users/GordonDrop/following{/other_user}","gists_url":"https://api.github.com/users/GordonDrop/gists{/gist_id}","starred_url":"https://api.github.com/users/GordonDrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordonDrop/subscriptions","organizations_url":"https://api.github.com/users/GordonDrop/orgs","repos_url":"https://api.github.com/users/GordonDrop/repos","events_url":"https://api.github.com/users/GordonDrop/events{/privacy}","received_events_url":"https://api.github.com/users/GordonDrop/received_events","type":"User","site_admin":false},"html_url":"https://github.com/GordonDrop/ru.javascript.info","description":"Современный учебник JavaScript","fork":true,"url":"https://api.github.com/repos/GordonDrop/ru.javascript.info","forks_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/forks","keys_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/teams","hooks_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/hooks","issue_events_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/issues/events{/number}","events_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/events","assignees_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/assignees{/user}","branches_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/branches{/branch}","tags_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/tags","blobs_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/git/refs{/sha}","trees_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/statuses/{sha}","languages_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/languages","stargazers_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/stargazers","contributors_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/contributors","subscribers_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/subscribers","subscription_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/subscription","commits_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/commits{/sha}","git_commits_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/git/commits{/sha}","comments_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/comments{/number}","issue_comment_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/issues/comments{/number}","contents_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/contents/{+path}","compare_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/merges","archive_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/downloads","issues_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/issues{/number}","pulls_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/pulls{/number}","milestones_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/milestones{/number}","notifications_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/labels{/name}","releases_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/releases{/id}","deployments_url":"https://api.github.com/repos/GordonDrop/ru.javascript.info/deployments","created_at":"2019-04-23T18:41:24Z","updated_at":"2019-04-23T18:41:29Z","pushed_at":"2019-05-07T11:33:42Z","git_url":"git://github.com/GordonDrop/ru.javascript.info.git","ssh_url":"git@github.com:GordonDrop/ru.javascript.info.git","clone_url":"https://github.com/GordonDrop/ru.javascript.info.git","svn_url":"https://github.com/GordonDrop/ru.javascript.info","homepage":"https://javascript.info","size":492403,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"javascript-tutorial:master","ref":"master","sha":"1c7a55efb38026fa9660ff91077ad5787ab5f3ae","user":{"login":"javascript-tutorial","id":49552305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NTUyMzA1","avatar_url":"https://avatars1.githubusercontent.com/u/49552305?v=4","gravatar_id":"","url":"https://api.github.com/users/javascript-tutorial","html_url":"https://github.com/javascript-tutorial","followers_url":"https://api.github.com/users/javascript-tutorial/followers","following_url":"https://api.github.com/users/javascript-tutorial/following{/other_user}","gists_url":"https://api.github.com/users/javascript-tutorial/gists{/gist_id}","starred_url":"https://api.github.com/users/javascript-tutorial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javascript-tutorial/subscriptions","organizations_url":"https://api.github.com/users/javascript-tutorial/orgs","repos_url":"https://api.github.com/users/javascript-tutorial/repos","events_url":"https://api.github.com/users/javascript-tutorial/events{/privacy}","received_events_url":"https://api.github.com/users/javascript-tutorial/received_events","type":"Organization","site_admin":false},"repo":{"id":160851084,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA4NTEwODQ=","name":"ru.javascript.info","full_name":"javascript-tutorial/ru.javascript.info","private":false,"owner":{"login":"javascript-tutorial","id":49552305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NTUyMzA1","avatar_url":"https://avatars1.githubusercontent.com/u/49552305?v=4","gravatar_id":"","url":"https://api.github.com/users/javascript-tutorial","html_url":"https://github.com/javascript-tutorial","followers_url":"https://api.github.com/users/javascript-tutorial/followers","following_url":"https://api.github.com/users/javascript-tutorial/following{/other_user}","gists_url":"https://api.github.com/users/javascript-tutorial/gists{/gist_id}","starred_url":"https://api.github.com/users/javascript-tutorial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javascript-tutorial/subscriptions","organizations_url":"https://api.github.com/users/javascript-tutorial/orgs","repos_url":"https://api.github.com/users/javascript-tutorial/repos","events_url":"https://api.github.com/users/javascript-tutorial/events{/privacy}","received_events_url":"https://api.github.com/users/javascript-tutorial/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/javascript-tutorial/ru.javascript.info","description":"Современный учебник JavaScript","fork":false,"url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info","forks_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/forks","keys_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/teams","hooks_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/hooks","issue_events_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/issues/events{/number}","events_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/events","assignees_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/assignees{/user}","branches_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/branches{/branch}","tags_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/tags","blobs_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/git/refs{/sha}","trees_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/statuses/{sha}","languages_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/languages","stargazers_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/stargazers","contributors_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/contributors","subscribers_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/subscribers","subscription_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/subscription","commits_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/commits{/sha}","git_commits_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/git/commits{/sha}","comments_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/comments{/number}","issue_comment_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/issues/comments{/number}","contents_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/contents/{+path}","compare_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/merges","archive_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/downloads","issues_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/issues{/number}","pulls_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls{/number}","milestones_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/milestones{/number}","notifications_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/labels{/name}","releases_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/releases{/id}","deployments_url":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/deployments","created_at":"2018-12-07T16:49:32Z","updated_at":"2019-05-09T14:10:33Z","pushed_at":"2019-05-09T14:10:24Z","git_url":"git://github.com/javascript-tutorial/ru.javascript.info.git","ssh_url":"git@github.com:javascript-tutorial/ru.javascript.info.git","clone_url":"https://github.com/javascript-tutorial/ru.javascript.info.git","svn_url":"https://github.com/javascript-tutorial/ru.javascript.info","homepage":"learn.javascript.ru","size":493094,"stargazers_count":167,"watchers_count":167,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":91,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":101,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":91,"open_issues":101,"watchers":167,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144"},"html":{"href":"https://github.com/javascript-tutorial/ru.javascript.info/pull/144"},"issue":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/issues/144"},"comments":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/javascript-tutorial/ru.javascript.info/statuses/30a7388692ca8740cf1c59d9172395544ade0349"}},"author_association":"NONE"}}
{"actor":{"display_login":"iliakan"}}