{"action":"created","issue":{"url":"https://api.github.com/repos/marijnh/Eloquent-JavaScript/issues/295","repository_url":"https://api.github.com/repos/marijnh/Eloquent-JavaScript","labels_url":"https://api.github.com/repos/marijnh/Eloquent-JavaScript/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/marijnh/Eloquent-JavaScript/issues/295/comments","events_url":"https://api.github.com/repos/marijnh/Eloquent-JavaScript/issues/295/events","html_url":"https://github.com/marijnh/Eloquent-JavaScript/issues/295","id":295014366,"number":295,"title":"Code example has redundant `else` block","user":{"login":"sangupta","id":883042,"avatar_url":"https://avatars2.githubusercontent.com/u/883042?v=4","gravatar_id":"","url":"https://api.github.com/users/sangupta","html_url":"https://github.com/sangupta","followers_url":"https://api.github.com/users/sangupta/followers","following_url":"https://api.github.com/users/sangupta/following{/other_user}","gists_url":"https://api.github.com/users/sangupta/gists{/gist_id}","starred_url":"https://api.github.com/users/sangupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangupta/subscriptions","organizations_url":"https://api.github.com/users/sangupta/orgs","repos_url":"https://api.github.com/users/sangupta/repos","events_url":"https://api.github.com/users/sangupta/events{/privacy}","received_events_url":"https://api.github.com/users/sangupta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-07T05:46:38Z","updated_at":"2018-02-07T17:07:40Z","closed_at":"2018-02-07T17:07:40Z","author_association":"NONE","body":"The `else` block in the code example below is redundant - as it is immediately preceded by a `return` statement. Code sample is as under:\r\n\r\n![image](https://user-images.githubusercontent.com/883042/35900471-f69a797e-0b86-11e8-9701-a689ad2093c8.png)\r\n\r\nThe code block is available on this page: https://eloquentjavascript.net/3rd_edition/00_intro.html\r\n\r\nThere are other occurrences where the same pattern is used. I can help send a PR if needed.\r\n "},"comment":{"url":"https://api.github.com/repos/marijnh/Eloquent-JavaScript/issues/comments/363839049","html_url":"https://github.com/marijnh/Eloquent-JavaScript/issues/295#issuecomment-363839049","issue_url":"https://api.github.com/repos/marijnh/Eloquent-JavaScript/issues/295","id":363839049,"user":{"login":"marijnh","id":144427,"avatar_url":"https://avatars3.githubusercontent.com/u/144427?v=4","gravatar_id":"","url":"https://api.github.com/users/marijnh","html_url":"https://github.com/marijnh","followers_url":"https://api.github.com/users/marijnh/followers","following_url":"https://api.github.com/users/marijnh/following{/other_user}","gists_url":"https://api.github.com/users/marijnh/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnh/subscriptions","organizations_url":"https://api.github.com/users/marijnh/orgs","repos_url":"https://api.github.com/users/marijnh/repos","events_url":"https://api.github.com/users/marijnh/events{/privacy}","received_events_url":"https://api.github.com/users/marijnh/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T17:07:40Z","updated_at":"2018-02-07T17:07:40Z","author_association":"OWNER","body":"Yeah this is intentional. Sure it's technically redundant, but it's entirely harmless and makes the code easier to scan. You'll see more code like that throughout the book."}}
{"actor":{"display_login":"marijnh"}}