{"action":"closed","number":1010,"pull_request":{"url":"https://api.github.com/repos/airbnb/javascript/pulls/1010","id":80983117,"html_url":"https://github.com/airbnb/javascript/pull/1010","diff_url":"https://github.com/airbnb/javascript/pull/1010.diff","patch_url":"https://github.com/airbnb/javascript/pull/1010.patch","issue_url":"https://api.github.com/repos/airbnb/javascript/issues/1010","number":1010,"state":"closed","locked":false,"title":"Altered a \"bad\" example that didn't actually work under 8.2.","user":{"login":"Gisleburt","id":2369524,"avatar_url":"https://avatars.githubusercontent.com/u/2369524?v=3","gravatar_id":"","url":"https://api.github.com/users/Gisleburt","html_url":"https://github.com/Gisleburt","followers_url":"https://api.github.com/users/Gisleburt/followers","following_url":"https://api.github.com/users/Gisleburt/following{/other_user}","gists_url":"https://api.github.com/users/Gisleburt/gists{/gist_id}","starred_url":"https://api.github.com/users/Gisleburt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gisleburt/subscriptions","organizations_url":"https://api.github.com/users/Gisleburt/orgs","repos_url":"https://api.github.com/users/Gisleburt/repos","events_url":"https://api.github.com/users/Gisleburt/events{/privacy}","received_events_url":"https://api.github.com/users/Gisleburt/received_events","type":"User","site_admin":false},"body":"This previously gave the example:\r\n\r\n```\r\n[1, 2, 3].map(number => {\r\n  const nextNumber = number + 1;\r\n  `A string containing the ${nextNumber}.`;\r\n});\r\n```\r\nHowever, in both node 5, and node 6, this example doesn't actually work. It certainly is \"bad\" but not for the given reason. It also gave me (and perhaps others) the impression that the final statement was implicitly returned when it's not.\r\n\r\n```\r\n$  docker run -it --rm node:6 node\r\n> const test = [1, 2, 3].map(number => {\r\n... const nextNumber = number + 1;\r\n... `A string containing the ${nextNumber}.`;\r\n... });\r\nundefined\r\n> test\r\n[ undefined, undefined, undefined ]\r\n>\r\n(To exit, press ^C again or type .exit)\r\n>\r\n\r\n$  docker run -it --rm node:5 node\r\n> const test = [1, 2, 3].map(number => {\r\n... const nextNumber = number + 1;\r\n... `A string containing the ${nextNumber}.`;\r\n... });\r\nundefined\r\n> test\r\n[ undefined, undefined, undefined ]\r\n>\r\n(To exit, press ^C again or type .exit)\r\n>\r\n```\r\n\r\nI've chosen another example that does work and seems \"bad\" based on the explanation given in the guide.\r\n\r\n```\r\n& docker run -it --rm node:5 node\r\n> let test = [1, 2, 3].map(number => { return `A string containing the ${number}.`; });\r\nundefined\r\n> test\r\n[ 'A string containing the 1.',\r\n  'A string containing the 2.',\r\n  'A string containing the 3.' ]\r\n>\r\n(To exit, press ^C again or type .exit)\r\n>});\r\n\r\n\r\n$ docker run -it --rm node:6 node\r\n> let test = [1, 2, 3].map(number => { return `A string containing the ${number}.`; });\r\nundefined\r\n> test\r\n[ 'A string containing the 1.',\r\n  'A string containing the 2.',\r\n  'A string containing the 3.' ]\r\n>\r\n(To exit, press ^C again or type .exit)\r\n>});\r\n```","created_at":"2016-08-11T15:55:11Z","updated_at":"2016-08-11T19:19:59Z","closed_at":"2016-08-11T19:19:59Z","merged_at":null,"merge_commit_sha":"3a9494f48834f148f64b3802b00d30a458d7433e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/javascript/pulls/1010/commits","review_comments_url":"https://api.github.com/repos/airbnb/javascript/pulls/1010/comments","review_comment_url":"https://api.github.com/repos/airbnb/javascript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/javascript/issues/1010/comments","statuses_url":"https://api.github.com/repos/airbnb/javascript/statuses/bb4f173bce813c2df57ef0b64938ff227203fd68","head":{"label":"Gisleburt:Gisleburt-patch-1","ref":"Gisleburt-patch-1","sha":"bb4f173bce813c2df57ef0b64938ff227203fd68","user":{"login":"Gisleburt","id":2369524,"avatar_url":"https://avatars.githubusercontent.com/u/2369524?v=3","gravatar_id":"","url":"https://api.github.com/users/Gisleburt","html_url":"https://github.com/Gisleburt","followers_url":"https://api.github.com/users/Gisleburt/followers","following_url":"https://api.github.com/users/Gisleburt/following{/other_user}","gists_url":"https://api.github.com/users/Gisleburt/gists{/gist_id}","starred_url":"https://api.github.com/users/Gisleburt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gisleburt/subscriptions","organizations_url":"https://api.github.com/users/Gisleburt/orgs","repos_url":"https://api.github.com/users/Gisleburt/repos","events_url":"https://api.github.com/users/Gisleburt/events{/privacy}","received_events_url":"https://api.github.com/users/Gisleburt/received_events","type":"User","site_admin":false},"repo":{"id":65481370,"name":"javascript","full_name":"Gisleburt/javascript","owner":{"login":"Gisleburt","id":2369524,"avatar_url":"https://avatars.githubusercontent.com/u/2369524?v=3","gravatar_id":"","url":"https://api.github.com/users/Gisleburt","html_url":"https://github.com/Gisleburt","followers_url":"https://api.github.com/users/Gisleburt/followers","following_url":"https://api.github.com/users/Gisleburt/following{/other_user}","gists_url":"https://api.github.com/users/Gisleburt/gists{/gist_id}","starred_url":"https://api.github.com/users/Gisleburt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gisleburt/subscriptions","organizations_url":"https://api.github.com/users/Gisleburt/orgs","repos_url":"https://api.github.com/users/Gisleburt/repos","events_url":"https://api.github.com/users/Gisleburt/events{/privacy}","received_events_url":"https://api.github.com/users/Gisleburt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gisleburt/javascript","description":"JavaScript Style Guide","fork":true,"url":"https://api.github.com/repos/Gisleburt/javascript","forks_url":"https://api.github.com/repos/Gisleburt/javascript/forks","keys_url":"https://api.github.com/repos/Gisleburt/javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gisleburt/javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gisleburt/javascript/teams","hooks_url":"https://api.github.com/repos/Gisleburt/javascript/hooks","issue_events_url":"https://api.github.com/repos/Gisleburt/javascript/issues/events{/number}","events_url":"https://api.github.com/repos/Gisleburt/javascript/events","assignees_url":"https://api.github.com/repos/Gisleburt/javascript/assignees{/user}","branches_url":"https://api.github.com/repos/Gisleburt/javascript/branches{/branch}","tags_url":"https://api.github.com/repos/Gisleburt/javascript/tags","blobs_url":"https://api.github.com/repos/Gisleburt/javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gisleburt/javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gisleburt/javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gisleburt/javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gisleburt/javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/Gisleburt/javascript/languages","stargazers_url":"https://api.github.com/repos/Gisleburt/javascript/stargazers","contributors_url":"https://api.github.com/repos/Gisleburt/javascript/contributors","subscribers_url":"https://api.github.com/repos/Gisleburt/javascript/subscribers","subscription_url":"https://api.github.com/repos/Gisleburt/javascript/subscription","commits_url":"https://api.github.com/repos/Gisleburt/javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gisleburt/javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gisleburt/javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gisleburt/javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gisleburt/javascript/contents/{+path}","compare_url":"https://api.github.com/repos/Gisleburt/javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gisleburt/javascript/merges","archive_url":"https://api.github.com/repos/Gisleburt/javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gisleburt/javascript/downloads","issues_url":"https://api.github.com/repos/Gisleburt/javascript/issues{/number}","pulls_url":"https://api.github.com/repos/Gisleburt/javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/Gisleburt/javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/Gisleburt/javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gisleburt/javascript/labels{/name}","releases_url":"https://api.github.com/repos/Gisleburt/javascript/releases{/id}","deployments_url":"https://api.github.com/repos/Gisleburt/javascript/deployments","created_at":"2016-08-11T15:40:29Z","updated_at":"2016-08-11T15:40:31Z","pushed_at":"2016-08-11T15:53:24Z","git_url":"git://github.com/Gisleburt/javascript.git","ssh_url":"git@github.com:Gisleburt/javascript.git","clone_url":"https://github.com/Gisleburt/javascript.git","svn_url":"https://github.com/Gisleburt/javascript","homepage":null,"size":1701,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"0b8e466397e538f3120ae92d0f5461262a7750cd","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":6498492,"name":"javascript","full_name":"airbnb/javascript","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/javascript","description":"JavaScript Style Guide","fork":false,"url":"https://api.github.com/repos/airbnb/javascript","forks_url":"https://api.github.com/repos/airbnb/javascript/forks","keys_url":"https://api.github.com/repos/airbnb/javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/javascript/teams","hooks_url":"https://api.github.com/repos/airbnb/javascript/hooks","issue_events_url":"https://api.github.com/repos/airbnb/javascript/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/javascript/events","assignees_url":"https://api.github.com/repos/airbnb/javascript/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/javascript/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/javascript/tags","blobs_url":"https://api.github.com/repos/airbnb/javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/javascript/languages","stargazers_url":"https://api.github.com/repos/airbnb/javascript/stargazers","contributors_url":"https://api.github.com/repos/airbnb/javascript/contributors","subscribers_url":"https://api.github.com/repos/airbnb/javascript/subscribers","subscription_url":"https://api.github.com/repos/airbnb/javascript/subscription","commits_url":"https://api.github.com/repos/airbnb/javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/javascript/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/javascript/merges","archive_url":"https://api.github.com/repos/airbnb/javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/javascript/downloads","issues_url":"https://api.github.com/repos/airbnb/javascript/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/javascript/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/javascript/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/javascript/deployments","created_at":"2012-11-01T23:13:50Z","updated_at":"2016-08-11T18:45:14Z","pushed_at":"2016-08-11T15:55:11Z","git_url":"git://github.com/airbnb/javascript.git","ssh_url":"git@github.com:airbnb/javascript.git","clone_url":"https://github.com/airbnb/javascript.git","svn_url":"https://github.com/airbnb/javascript","homepage":null,"size":3428,"stargazers_count":39006,"watchers_count":39006,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7329,"mirror_url":null,"open_issues_count":71,"forks":7329,"open_issues":71,"watchers":39006,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/1010"},"html":{"href":"https://github.com/airbnb/javascript/pull/1010"},"issue":{"href":"https://api.github.com/repos/airbnb/javascript/issues/1010"},"comments":{"href":"https://api.github.com/repos/airbnb/javascript/issues/1010/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/1010/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/1010/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/javascript/statuses/bb4f173bce813c2df57ef0b64938ff227203fd68"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":7,"review_comments":0,"commits":1,"additions":1,"deletions":4,"changed_files":1}}
{"actor":{"display_login":"ljharb"}}