payload: {"action":"created","comment":{"url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/comments/282297616","pull_request_review_id":235347914,"id":282297616,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4MjI5NzYxNg==","diff_hunk":"@@ -0,0 +1,310 @@\n+'use strict';\n+\n+/* ------------------------------------------------------------------------------------------------\n+CHALLENGE 1\n+\n+You friend Pat has a chain of stores around the greater Seattle area. He specializes in selling salmon cookies. Pat has data for the hourly sales of cookies per hour for each store. He wants to create an array of the total number of cookies sold per hour for all of his stores combined.\n+\n+Write a function named grandTotal that adds up the cookies sales for each hour of operation for all of the stores combined. For example, the first element in the hourlySales array should be the sum of the cookies sold in the 9:00 a.m. hour at all five stores combined.\n+\n+For this example, the total at 9:00 a.m. is 17 + 26 + 7 + 5 + 33, or 88 total cookies.\n+\n+Return the array of the total number of cookies sold per hour for all of the stores combined.\n+------------------------------------------------------------------------------------------------ */\n+\n+const hoursOpen = ['9 a.m.', '10 a.m.', '11 a.m.', '12 p.m.', '1 p.m.', '2 p.m.', '3 p.m.', '4 p.m.', '5 p.m.', '6 p.m.', '7 p.m.', '8 p.m.'];\n+\n+const firstPike = [17, 18, 23, 24, 24, 12, 13, 27, 30, 20, 24, 18];\n+const seaTac = [26, 5, 5, 59, 23, 39, 38, 20, 30, 7, 59, 43];\n+const seattleCenter = [7, 14, 19, 22, 15, 4, 23, 27, 28, 23, 1, 29];\n+const capHill = [5, 85, 58, 51, 50, 13, 33, 32, 47, 94, 31, 62];\n+const alkiBeach = [33, 31, 147, 130, 27, 93, 38, 126, 141, 63, 46, 17];\n+\n+const cookieStores = [firstPike, seaTac, seattleCenter, capHill, alkiBeach];\n+\n+const grandTotal = (stores) => {\n+  let hSales = [0,0,0,0,0,0,0,0,0,0,0,0];\n+  for(let i=0; i < stores.length; i++){\n+    for(let j=0; j < hoursOpen.length; j++){\n+      hSales[j] = stores[i][j]+hSales[j];\n+    }\n+  }\n+  return hSales;\n+};\n+\n+/* ------------------------------------------------------------------------------------------------\n+CHALLENGE 2\n+\n+Pat has decided that he would also like to organize his data as objects containing the number of cookies sold per hour and the time.\n+\n+Here is sample data for the 9:00 sales: { sales: '88 cookies', time: '9 a.m.' }.\n+\n+Write a function named salesData that uses forEach to iterate over the hourlySales array and create an object for each hour. Return an array of the formatted data.\n+------------------------------------------------------------------------------------------------ */\n+\n+const salesData = (hours, data) => {\n+    let arr = [];\n+    hours.forEach((value, i) => {","path":"301d58/code-challenges/2dimarray/challenges-12.test.js","position":47,"original_position":47,"commit_id":"984fc324b13213f368a061f9d2cc2842eb04d9a1","original_commit_id":"984fc324b13213f368a061f9d2cc2842eb04d9a1","user":{"login":"evanslaton","id":31529772,"node_id":"MDQ6VXNlcjMxNTI5Nzcy","avatar_url":"https://avatars3.githubusercontent.com/u/31529772?v=4","gravatar_id":"","url":"https://api.github.com/users/evanslaton","html_url":"https://github.com/evanslaton","followers_url":"https://api.github.com/users/evanslaton/followers","following_url":"https://api.github.com/users/evanslaton/following{/other_user}","gists_url":"https://api.github.com/users/evanslaton/gists{/gist_id}","starred_url":"https://api.github.com/users/evanslaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanslaton/subscriptions","organizations_url":"https://api.github.com/users/evanslaton/orgs","repos_url":"https://api.github.com/users/evanslaton/repos","events_url":"https://api.github.com/users/evanslaton/events{/privacy}","received_events_url":"https://api.github.com/users/evanslaton/received_events","type":"User","site_admin":false},"body":"Anytime you are returning a new array with that contains data that you are manipulating you should consider using map","created_at":"2019-05-08T23:56:27Z","updated_at":"2019-05-08T23:56:27Z","html_url":"https://github.com/RogerHuba/data_structures_and_algorithms/pull/54#discussion_r282297616","pull_request_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/comments/282297616"},"html":{"href":"https://github.com/RogerHuba/data_structures_and_algorithms/pull/54#discussion_r282297616"},"pull_request":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54","id":277149078,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc3MTQ5MDc4","html_url":"https://github.com/RogerHuba/data_structures_and_algorithms/pull/54","diff_url":"https://github.com/RogerHuba/data_structures_and_algorithms/pull/54.diff","patch_url":"https://github.com/RogerHuba/data_structures_and_algorithms/pull/54.patch","issue_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/54","number":54,"state":"closed","locked":false,"title":"submission","user":{"login":"RogerHuba","id":38219102,"node_id":"MDQ6VXNlcjM4MjE5MTAy","avatar_url":"https://avatars0.githubusercontent.com/u/38219102?v=4","gravatar_id":"","url":"https://api.github.com/users/RogerHuba","html_url":"https://github.com/RogerHuba","followers_url":"https://api.github.com/users/RogerHuba/followers","following_url":"https://api.github.com/users/RogerHuba/following{/other_user}","gists_url":"https://api.github.com/users/RogerHuba/gists{/gist_id}","starred_url":"https://api.github.com/users/RogerHuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RogerHuba/subscriptions","organizations_url":"https://api.github.com/users/RogerHuba/orgs","repos_url":"https://api.github.com/users/RogerHuba/repos","events_url":"https://api.github.com/users/RogerHuba/events{/privacy}","received_events_url":"https://api.github.com/users/RogerHuba/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-05-08T20:48:40Z","updated_at":"2019-05-08T23:56:27Z","closed_at":"2019-05-08T20:48:46Z","merged_at":"2019-05-08T20:48:46Z","merge_commit_sha":"cd68f2d79dc4e15e04fae5512eb7b8f26b3b7b9a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54/commits","review_comments_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54/comments","review_comment_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/54/comments","statuses_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/statuses/984fc324b13213f368a061f9d2cc2842eb04d9a1","head":{"label":"RogerHuba:2-dim-array","ref":"2-dim-array","sha":"984fc324b13213f368a061f9d2cc2842eb04d9a1","user":{"login":"RogerHuba","id":38219102,"node_id":"MDQ6VXNlcjM4MjE5MTAy","avatar_url":"https://avatars0.githubusercontent.com/u/38219102?v=4","gravatar_id":"","url":"https://api.github.com/users/RogerHuba","html_url":"https://github.com/RogerHuba","followers_url":"https://api.github.com/users/RogerHuba/followers","following_url":"https://api.github.com/users/RogerHuba/following{/other_user}","gists_url":"https://api.github.com/users/RogerHuba/gists{/gist_id}","starred_url":"https://api.github.com/users/RogerHuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RogerHuba/subscriptions","organizations_url":"https://api.github.com/users/RogerHuba/orgs","repos_url":"https://api.github.com/users/RogerHuba/repos","events_url":"https://api.github.com/users/RogerHuba/events{/privacy}","received_events_url":"https://api.github.com/users/RogerHuba/received_events","type":"User","site_admin":false},"repo":{"id":159421294,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk0MjEyOTQ=","name":"data_structures_and_algorithms","full_name":"RogerHuba/data_structures_and_algorithms","private":false,"owner":{"login":"RogerHuba","id":38219102,"node_id":"MDQ6VXNlcjM4MjE5MTAy","avatar_url":"https://avatars0.githubusercontent.com/u/38219102?v=4","gravatar_id":"","url":"https://api.github.com/users/RogerHuba","html_url":"https://github.com/RogerHuba","followers_url":"https://api.github.com/users/RogerHuba/followers","following_url":"https://api.github.com/users/RogerHuba/following{/other_user}","gists_url":"https://api.github.com/users/RogerHuba/gists{/gist_id}","starred_url":"https://api.github.com/users/RogerHuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RogerHuba/subscriptions","organizations_url":"https://api.github.com/users/RogerHuba/orgs","repos_url":"https://api.github.com/users/RogerHuba/repos","events_url":"https://api.github.com/users/RogerHuba/events{/privacy}","received_events_url":"https://api.github.com/users/RogerHuba/received_events","type":"User","site_admin":false},"html_url":"https://github.com/RogerHuba/data_structures_and_algorithms","description":null,"fork":false,"url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms","forks_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/forks","keys_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/teams","hooks_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/hooks","issue_events_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/events","assignees_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/tags","blobs_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/languages","stargazers_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/stargazers","contributors_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/contributors","subscribers_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/subscribers","subscription_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/subscription","commits_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/merges","archive_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/downloads","issues_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/labels{/name}","releases_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/deployments","created_at":"2018-11-28T00:52:41Z","updated_at":"2019-05-08T20:48:48Z","pushed_at":"2019-05-08T20:48:46Z","git_url":"git://github.com/RogerHuba/data_structures_and_algorithms.git","ssh_url":"git@github.com:RogerHuba/data_structures_and_algorithms.git","clone_url":"https://github.com/RogerHuba/data_structures_and_algorithms.git","svn_url":"https://github.com/RogerHuba/data_structures_and_algorithms","homepage":null,"size":18248,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"RogerHuba:master","ref":"master","sha":"3002e038d7b3aeac0314ba85a8fc7d259de332c4","user":{"login":"RogerHuba","id":38219102,"node_id":"MDQ6VXNlcjM4MjE5MTAy","avatar_url":"https://avatars0.githubusercontent.com/u/38219102?v=4","gravatar_id":"","url":"https://api.github.com/users/RogerHuba","html_url":"https://github.com/RogerHuba","followers_url":"https://api.github.com/users/RogerHuba/followers","following_url":"https://api.github.com/users/RogerHuba/following{/other_user}","gists_url":"https://api.github.com/users/RogerHuba/gists{/gist_id}","starred_url":"https://api.github.com/users/RogerHuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RogerHuba/subscriptions","organizations_url":"https://api.github.com/users/RogerHuba/orgs","repos_url":"https://api.github.com/users/RogerHuba/repos","events_url":"https://api.github.com/users/RogerHuba/events{/privacy}","received_events_url":"https://api.github.com/users/RogerHuba/received_events","type":"User","site_admin":false},"repo":{"id":159421294,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk0MjEyOTQ=","name":"data_structures_and_algorithms","full_name":"RogerHuba/data_structures_and_algorithms","private":false,"owner":{"login":"RogerHuba","id":38219102,"node_id":"MDQ6VXNlcjM4MjE5MTAy","avatar_url":"https://avatars0.githubusercontent.com/u/38219102?v=4","gravatar_id":"","url":"https://api.github.com/users/RogerHuba","html_url":"https://github.com/RogerHuba","followers_url":"https://api.github.com/users/RogerHuba/followers","following_url":"https://api.github.com/users/RogerHuba/following{/other_user}","gists_url":"https://api.github.com/users/RogerHuba/gists{/gist_id}","starred_url":"https://api.github.com/users/RogerHuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RogerHuba/subscriptions","organizations_url":"https://api.github.com/users/RogerHuba/orgs","repos_url":"https://api.github.com/users/RogerHuba/repos","events_url":"https://api.github.com/users/RogerHuba/events{/privacy}","received_events_url":"https://api.github.com/users/RogerHuba/received_events","type":"User","site_admin":false},"html_url":"https://github.com/RogerHuba/data_structures_and_algorithms","description":null,"fork":false,"url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms","forks_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/forks","keys_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/teams","hooks_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/hooks","issue_events_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/events","assignees_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/tags","blobs_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/languages","stargazers_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/stargazers","contributors_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/contributors","subscribers_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/subscribers","subscription_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/subscription","commits_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/merges","archive_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/downloads","issues_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/labels{/name}","releases_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/deployments","created_at":"2018-11-28T00:52:41Z","updated_at":"2019-05-08T20:48:48Z","pushed_at":"2019-05-08T20:48:46Z","git_url":"git://github.com/RogerHuba/data_structures_and_algorithms.git","ssh_url":"git@github.com:RogerHuba/data_structures_and_algorithms.git","clone_url":"https://github.com/RogerHuba/data_structures_and_algorithms.git","svn_url":"https://github.com/RogerHuba/data_structures_and_algorithms","homepage":null,"size":18248,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54"},"html":{"href":"https://github.com/RogerHuba/data_structures_and_algorithms/pull/54"},"issue":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/54"},"comments":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/RogerHuba/data_structures_and_algorithms/statuses/984fc324b13213f368a061f9d2cc2842eb04d9a1"}},"author_association":"OWNER"}}
other: {"actor":{"display_login":"evanslaton"}}