{"action":"created","comment":{"url":"https://api.github.com/repos/asciidwango/js-primer/pulls/comments/243752982","pull_request_review_id":187609509,"id":243752982,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mzc1Mjk4Mg==","diff_hunk":"@@ -4,34 +4,26 @@ description: 関数の宣言方法とメソッドについて\n ---\n # 関数と宣言 {#function-and-declaration}\n \n-JavaScriptでは、処理をまとめる際に関数やメソッド、クラスを使います。\n-これらは関数オブジェクトと言われる関数として使えるオブジェクトの一種です。\n+JavaScriptでは、処理をまとめる際に**関数**と呼ばれる機能を利用します。\n+関数とはいくつかの文からなる処理を1つの処理としてまとめる機能です。\n+関数は関数オブジェクトとも呼ばれ、オブジェクトの一種です。\n \n-関数オブジェクトは`()`を付けることで関数として呼び出すことができます。\n-またオブジェクトでもあるため、`{}`で定義したオブジェクトと同じ使い方もできます。\n+関数はただのオブジェクトとは異なり、関数名に`()`を付けることで、まとめた処理を呼び出すことができます。\n+関数を利用することで、同じ処理を毎回書くのではなく、一度定義した関数を呼び出すことで同じ処理を実行できます。","path":"source/basic/function-declaration/README.md","position":13,"original_position":13,"commit_id":"21dbd52b0ede2bd463df989970f3de3e7dd906b4","original_commit_id":"21dbd52b0ede2bd463df989970f3de3e7dd906b4","user":{"login":"azu","id":19714,"node_id":"MDQ6VXNlcjE5NzE0","avatar_url":"https://avatars1.githubusercontent.com/u/19714?v=4","gravatar_id":"","url":"https://api.github.com/users/azu","html_url":"https://github.com/azu","followers_url":"https://api.github.com/users/azu/followers","following_url":"https://api.github.com/users/azu/following{/other_user}","gists_url":"https://api.github.com/users/azu/gists{/gist_id}","starred_url":"https://api.github.com/users/azu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azu/subscriptions","organizations_url":"https://api.github.com/users/azu/orgs","repos_url":"https://api.github.com/users/azu/repos","events_url":"https://api.github.com/users/azu/events{/privacy}","received_events_url":"https://api.github.com/users/azu/received_events","type":"User","site_admin":false},"body":"ここは消して\"関数はオブジェクト\"にというセクションに移動するとよさそう。","created_at":"2018-12-23T06:20:14Z","updated_at":"2018-12-23T06:43:02Z","html_url":"https://github.com/asciidwango/js-primer/pull/605#discussion_r243752982","pull_request_url":"https://api.github.com/repos/asciidwango/js-primer/pulls/605","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/asciidwango/js-primer/pulls/comments/243752982"},"html":{"href":"https://github.com/asciidwango/js-primer/pull/605#discussion_r243752982"},"pull_request":{"href":"https://api.github.com/repos/asciidwango/js-primer/pulls/605"}}},"pull_request":{"url":"https://api.github.com/repos/asciidwango/js-primer/pulls/605","id":239859165,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5ODU5MTY1","html_url":"https://github.com/asciidwango/js-primer/pull/605","diff_url":"https://github.com/asciidwango/js-primer/pull/605.diff","patch_url":"https://github.com/asciidwango/js-primer/pull/605.patch","issue_url":"https://api.github.com/repos/asciidwango/js-primer/issues/605","number":605,"state":"open","locked":false,"title":"関数と宣言: 引数周りについてを書き直し","user":{"login":"azu","id":19714,"node_id":"MDQ6VXNlcjE5NzE0","avatar_url":"https://avatars1.githubusercontent.com/u/19714?v=4","gravatar_id":"","url":"https://api.github.com/users/azu","html_url":"https://github.com/azu","followers_url":"https://api.github.com/users/azu/followers","following_url":"https://api.github.com/users/azu/following{/other_user}","gists_url":"https://api.github.com/users/azu/gists{/gist_id}","starred_url":"https://api.github.com/users/azu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azu/subscriptions","organizations_url":"https://api.github.com/users/azu/orgs","repos_url":"https://api.github.com/users/azu/repos","events_url":"https://api.github.com/users/azu/events{/privacy}","received_events_url":"https://api.github.com/users/azu/received_events","type":"User","site_admin":false},"body":"関数と宣言の章を全体的に書き直し。\r\n\r\n- [x] https://jsprimer.net/basic/bad-parts/ を削除する https://github.com/asciidwango/js-primer/issues/595\r\n  - 関数と宣言で arguments のデメリットを扱うため\r\n- [x] デフォルト引数についても\"演算子\"から\"関数と宣言\"に移動する\r\n  - デフォルト引数を\"関数と宣言\"の引数周りの説明で扱う\r\n- [x] [関数と宣言: 引数の個数について · Issue #588 · asciidwango/js-primer](https://github.com/asciidwango/js-primer/issues/588)\r\n  - 引数周りの説明を追加する\r\n- [x] argmentsをrest parameterで代替えできることを https://jsprimer.net/basic/function-declaration/ で明示する\r\n  - ↑の説明\r\n  - `argumentsToArray`を例にする?\r\n- [ ] 関数宣言と関数式の違いについてを追記 https://github.com/asciidwango/js-primer/issues/284\r\n  - 補足\r\n\r\n## 量的な変化\r\n\r\n- 🔼 関数と宣言\r\n- 🔽 演算子\r\n- :recycle: 非推奨の章\r\n\r\n## Issue\r\n\r\nfix https://github.com/asciidwango/js-primer/issues/284\r\nfix https://github.com/asciidwango/js-primer/issues/274\r\nfix https://github.com/asciidwango/js-primer/issues/588\r\nfix https://github.com/asciidwango/js-primer/issues/595\r\nfix https://github.com/asciidwango/js-primer/issues/590","created_at":"2018-12-19T14:40:51Z","updated_at":"2018-12-23T06:43:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4af42d76d2cb01a09262966a75f857e80441f6f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":567608970,"node_id":"MDU6TGFiZWw1Njc2MDg5NzA=","url":"https://api.github.com/repos/asciidwango/js-primer/labels/Status:%20In%20Progress","name":"Status: In Progress","color":"cccccc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/asciidwango/js-primer/pulls/605/commits","review_comments_url":"https://api.github.com/repos/asciidwango/js-primer/pulls/605/comments","review_comment_url":"https://api.github.com/repos/asciidwango/js-primer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/asciidwango/js-primer/issues/605/comments","statuses_url":"https://api.github.com/repos/asciidwango/js-primer/statuses/21dbd52b0ede2bd463df989970f3de3e7dd906b4","head":{"label":"asciidwango:refactor-function-declaration","ref":"refactor-function-declaration","sha":"21dbd52b0ede2bd463df989970f3de3e7dd906b4","user":{"login":"asciidwango","id":10266070,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjY2MDcw","avatar_url":"https://avatars3.githubusercontent.com/u/10266070?v=4","gravatar_id":"","url":"https://api.github.com/users/asciidwango","html_url":"https://github.com/asciidwango","followers_url":"https://api.github.com/users/asciidwango/followers","following_url":"https://api.github.com/users/asciidwango/following{/other_user}","gists_url":"https://api.github.com/users/asciidwango/gists{/gist_id}","starred_url":"https://api.github.com/users/asciidwango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asciidwango/subscriptions","organizations_url":"https://api.github.com/users/asciidwango/orgs","repos_url":"https://api.github.com/users/asciidwango/repos","events_url":"https://api.github.com/users/asciidwango/events{/privacy}","received_events_url":"https://api.github.com/users/asciidwango/received_events","type":"Organization","site_admin":false},"repo":{"id":50896111,"node_id":"MDEwOlJlcG9zaXRvcnk1MDg5NjExMQ==","name":"js-primer","full_name":"asciidwango/js-primer","private":false,"owner":{"login":"asciidwango","id":10266070,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjY2MDcw","avatar_url":"https://avatars3.githubusercontent.com/u/10266070?v=4","gravatar_id":"","url":"https://api.github.com/users/asciidwango","html_url":"https://github.com/asciidwango","followers_url":"https://api.github.com/users/asciidwango/followers","following_url":"https://api.github.com/users/asciidwango/following{/other_user}","gists_url":"https://api.github.com/users/asciidwango/gists{/gist_id}","starred_url":"https://api.github.com/users/asciidwango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asciidwango/subscriptions","organizations_url":"https://api.github.com/users/asciidwango/orgs","repos_url":"https://api.github.com/users/asciidwango/repos","events_url":"https://api.github.com/users/asciidwango/events{/privacy}","received_events_url":"https://api.github.com/users/asciidwango/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/asciidwango/js-primer","description":":book:  JavaScriptの入門書","fork":false,"url":"https://api.github.com/repos/asciidwango/js-primer","forks_url":"https://api.github.com/repos/asciidwango/js-primer/forks","keys_url":"https://api.github.com/repos/asciidwango/js-primer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asciidwango/js-primer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asciidwango/js-primer/teams","hooks_url":"https://api.github.com/repos/asciidwango/js-primer/hooks","issue_events_url":"https://api.github.com/repos/asciidwango/js-primer/issues/events{/number}","events_url":"https://api.github.com/repos/asciidwango/js-primer/events","assignees_url":"https://api.github.com/repos/asciidwango/js-primer/assignees{/user}","branches_url":"https://api.github.com/repos/asciidwango/js-primer/branches{/branch}","tags_url":"https://api.github.com/repos/asciidwango/js-primer/tags","blobs_url":"https://api.github.com/repos/asciidwango/js-primer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asciidwango/js-primer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asciidwango/js-primer/git/refs{/sha}","trees_url":"https://api.github.com/repos/asciidwango/js-primer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asciidwango/js-primer/statuses/{sha}","languages_url":"https://api.github.com/repos/asciidwango/js-primer/languages","stargazers_url":"https://api.github.com/repos/asciidwango/js-primer/stargazers","contributors_url":"https://api.github.com/repos/asciidwango/js-primer/contributors","subscribers_url":"https://api.github.com/repos/asciidwango/js-primer/subscribers","subscription_url":"https://api.github.com/repos/asciidwango/js-primer/subscription","commits_url":"https://api.github.com/repos/asciidwango/js-primer/commits{/sha}","git_commits_url":"https://api.github.com/repos/asciidwango/js-primer/git/commits{/sha}","comments_url":"https://api.github.com/repos/asciidwango/js-primer/comments{/number}","issue_comment_url":"https://api.github.com/repos/asciidwango/js-primer/issues/comments{/number}","contents_url":"https://api.github.com/repos/asciidwango/js-primer/contents/{+path}","compare_url":"https://api.github.com/repos/asciidwango/js-primer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asciidwango/js-primer/merges","archive_url":"https://api.github.com/repos/asciidwango/js-primer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asciidwango/js-primer/downloads","issues_url":"https://api.github.com/repos/asciidwango/js-primer/issues{/number}","pulls_url":"https://api.github.com/repos/asciidwango/js-primer/pulls{/number}","milestones_url":"https://api.github.com/repos/asciidwango/js-primer/milestones{/number}","notifications_url":"https://api.github.com/repos/asciidwango/js-primer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asciidwango/js-primer/labels{/name}","releases_url":"https://api.github.com/repos/asciidwango/js-primer/releases{/id}","deployments_url":"https://api.github.com/repos/asciidwango/js-primer/deployments","created_at":"2016-02-02T05:16:25Z","updated_at":"2018-12-22T13:50:46Z","pushed_at":"2018-12-22T14:04:46Z","git_url":"git://github.com/asciidwango/js-primer.git","ssh_url":"git@github.com:asciidwango/js-primer.git","clone_url":"https://github.com/asciidwango/js-primer.git","svn_url":"https://github.com/asciidwango/js-primer","homepage":"https://jsprimer.net","size":8807,"stargazers_count":979,"watchers_count":979,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":57,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":57,"open_issues":55,"watchers":979,"default_branch":"master"}},"base":{"label":"asciidwango:master","ref":"master","sha":"498282430b52d1c6226e49fad3801c3911370689","user":{"login":"asciidwango","id":10266070,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjY2MDcw","avatar_url":"https://avatars3.githubusercontent.com/u/10266070?v=4","gravatar_id":"","url":"https://api.github.com/users/asciidwango","html_url":"https://github.com/asciidwango","followers_url":"https://api.github.com/users/asciidwango/followers","following_url":"https://api.github.com/users/asciidwango/following{/other_user}","gists_url":"https://api.github.com/users/asciidwango/gists{/gist_id}","starred_url":"https://api.github.com/users/asciidwango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asciidwango/subscriptions","organizations_url":"https://api.github.com/users/asciidwango/orgs","repos_url":"https://api.github.com/users/asciidwango/repos","events_url":"https://api.github.com/users/asciidwango/events{/privacy}","received_events_url":"https://api.github.com/users/asciidwango/received_events","type":"Organization","site_admin":false},"repo":{"id":50896111,"node_id":"MDEwOlJlcG9zaXRvcnk1MDg5NjExMQ==","name":"js-primer","full_name":"asciidwango/js-primer","private":false,"owner":{"login":"asciidwango","id":10266070,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMjY2MDcw","avatar_url":"https://avatars3.githubusercontent.com/u/10266070?v=4","gravatar_id":"","url":"https://api.github.com/users/asciidwango","html_url":"https://github.com/asciidwango","followers_url":"https://api.github.com/users/asciidwango/followers","following_url":"https://api.github.com/users/asciidwango/following{/other_user}","gists_url":"https://api.github.com/users/asciidwango/gists{/gist_id}","starred_url":"https://api.github.com/users/asciidwango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asciidwango/subscriptions","organizations_url":"https://api.github.com/users/asciidwango/orgs","repos_url":"https://api.github.com/users/asciidwango/repos","events_url":"https://api.github.com/users/asciidwango/events{/privacy}","received_events_url":"https://api.github.com/users/asciidwango/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/asciidwango/js-primer","description":":book:  JavaScriptの入門書","fork":false,"url":"https://api.github.com/repos/asciidwango/js-primer","forks_url":"https://api.github.com/repos/asciidwango/js-primer/forks","keys_url":"https://api.github.com/repos/asciidwango/js-primer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asciidwango/js-primer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asciidwango/js-primer/teams","hooks_url":"https://api.github.com/repos/asciidwango/js-primer/hooks","issue_events_url":"https://api.github.com/repos/asciidwango/js-primer/issues/events{/number}","events_url":"https://api.github.com/repos/asciidwango/js-primer/events","assignees_url":"https://api.github.com/repos/asciidwango/js-primer/assignees{/user}","branches_url":"https://api.github.com/repos/asciidwango/js-primer/branches{/branch}","tags_url":"https://api.github.com/repos/asciidwango/js-primer/tags","blobs_url":"https://api.github.com/repos/asciidwango/js-primer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asciidwango/js-primer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asciidwango/js-primer/git/refs{/sha}","trees_url":"https://api.github.com/repos/asciidwango/js-primer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asciidwango/js-primer/statuses/{sha}","languages_url":"https://api.github.com/repos/asciidwango/js-primer/languages","stargazers_url":"https://api.github.com/repos/asciidwango/js-primer/stargazers","contributors_url":"https://api.github.com/repos/asciidwango/js-primer/contributors","subscribers_url":"https://api.github.com/repos/asciidwango/js-primer/subscribers","subscription_url":"https://api.github.com/repos/asciidwango/js-primer/subscription","commits_url":"https://api.github.com/repos/asciidwango/js-primer/commits{/sha}","git_commits_url":"https://api.github.com/repos/asciidwango/js-primer/git/commits{/sha}","comments_url":"https://api.github.com/repos/asciidwango/js-primer/comments{/number}","issue_comment_url":"https://api.github.com/repos/asciidwango/js-primer/issues/comments{/number}","contents_url":"https://api.github.com/repos/asciidwango/js-primer/contents/{+path}","compare_url":"https://api.github.com/repos/asciidwango/js-primer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asciidwango/js-primer/merges","archive_url":"https://api.github.com/repos/asciidwango/js-primer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asciidwango/js-primer/downloads","issues_url":"https://api.github.com/repos/asciidwango/js-primer/issues{/number}","pulls_url":"https://api.github.com/repos/asciidwango/js-primer/pulls{/number}","milestones_url":"https://api.github.com/repos/asciidwango/js-primer/milestones{/number}","notifications_url":"https://api.github.com/repos/asciidwango/js-primer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asciidwango/js-primer/labels{/name}","releases_url":"https://api.github.com/repos/asciidwango/js-primer/releases{/id}","deployments_url":"https://api.github.com/repos/asciidwango/js-primer/deployments","created_at":"2016-02-02T05:16:25Z","updated_at":"2018-12-22T13:50:46Z","pushed_at":"2018-12-22T14:04:46Z","git_url":"git://github.com/asciidwango/js-primer.git","ssh_url":"git@github.com:asciidwango/js-primer.git","clone_url":"https://github.com/asciidwango/js-primer.git","svn_url":"https://github.com/asciidwango/js-primer","homepage":"https://jsprimer.net","size":8807,"stargazers_count":979,"watchers_count":979,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":57,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":57,"open_issues":55,"watchers":979,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/asciidwango/js-primer/pulls/605"},"html":{"href":"https://github.com/asciidwango/js-primer/pull/605"},"issue":{"href":"https://api.github.com/repos/asciidwango/js-primer/issues/605"},"comments":{"href":"https://api.github.com/repos/asciidwango/js-primer/issues/605/comments"},"review_comments":{"href":"https://api.github.com/repos/asciidwango/js-primer/pulls/605/comments"},"review_comment":{"href":"https://api.github.com/repos/asciidwango/js-primer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/asciidwango/js-primer/pulls/605/commits"},"statuses":{"href":"https://api.github.com/repos/asciidwango/js-primer/statuses/21dbd52b0ede2bd463df989970f3de3e7dd906b4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"azu"}}