{"action":"created","comment":{"url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/comments/57768486","id":57768486,"diff_hunk":"@@ -4,21 +4,62 @@\n // Describe in your own words what a `callback`\n // is in relation to array methods\n \n+A callback is a (1) function within a (2) function that calls the (2) function.\n+\n+With regards to array methods, it helps you to create and populate an array.\n+\n+\n // Question 2\n // Describe in your own words the differences between a `for` loop\n // and the `forEach` array method\n \n+A for loop just call each element of the array.  A forEach function actually operates on each element of the array.\n+\n \n // Question 3\n // Implement the `reduce` array method, using arrow function\n // syntax, to return the total sum of all values in the original array\n \n+let cb = function(i)\n+\n+{for (let i ==1; i <= array.length; i ++)\n+  let result (arr[0])\n+  {\n+    result = result + arr[i]\n+  }\n+  return result;\n+};\n+  {\n+\n+  return ++1;}\n+\n+let map = function(array, callback) {\n+  let newArr = [];\n+  for (let i ==1; i <= array.length; i ++)\n+  {\n+    newArr = callback(array[i]);\n+  }\n+  return newArr;\n+};\n+\n+console.log(map(arr, cb));\n+\n+module.exports = map;\n+\n \n // Question 4\n // Write a function that returns true\n // if invoking the callback for any element\n // in the array returns a truthy value\n+\n+\n const any = function any(array, callback) {\n+   for (let i === 0, i < array.length; i ++)","path":"lib/diagnostic.js","position":54,"original_position":54,"commit_id":"afc590f95091361c1e59bf67f1e3a961132d3f12","original_commit_id":"afc590f95091361c1e59bf67f1e3a961132d3f12","user":{"login":"RDegnen","id":8826469,"avatar_url":"https://avatars.githubusercontent.com/u/8826469?v=3","gravatar_id":"","url":"https://api.github.com/users/RDegnen","html_url":"https://github.com/RDegnen","followers_url":"https://api.github.com/users/RDegnen/followers","following_url":"https://api.github.com/users/RDegnen/following{/other_user}","gists_url":"https://api.github.com/users/RDegnen/gists{/gist_id}","starred_url":"https://api.github.com/users/RDegnen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RDegnen/subscriptions","organizations_url":"https://api.github.com/users/RDegnen/orgs","repos_url":"https://api.github.com/users/RDegnen/repos","events_url":"https://api.github.com/users/RDegnen/events{/privacy}","received_events_url":"https://api.github.com/users/RDegnen/received_events","type":"User","site_admin":false},"body":"you are comparing i to 0 here instead of setting i to equal zero","created_at":"2016-03-29T17:52:52Z","updated_at":"2016-03-29T17:52:52Z","html_url":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic/pull/70#discussion_r57768486","pull_request_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/comments/57768486"},"html":{"href":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic/pull/70#discussion_r57768486"},"pull_request":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70","id":64464185,"html_url":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic/pull/70","diff_url":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic/pull/70.diff","patch_url":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic/pull/70.patch","issue_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/issues/70","number":70,"state":"open","locked":false,"title":"answered the questions","user":{"login":"pvdri","id":13179185,"avatar_url":"https://avatars.githubusercontent.com/u/13179185?v=3","gravatar_id":"","url":"https://api.github.com/users/pvdri","html_url":"https://github.com/pvdri","followers_url":"https://api.github.com/users/pvdri/followers","following_url":"https://api.github.com/users/pvdri/following{/other_user}","gists_url":"https://api.github.com/users/pvdri/gists{/gist_id}","starred_url":"https://api.github.com/users/pvdri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvdri/subscriptions","organizations_url":"https://api.github.com/users/pvdri/orgs","repos_url":"https://api.github.com/users/pvdri/repos","events_url":"https://api.github.com/users/pvdri/events{/privacy}","received_events_url":"https://api.github.com/users/pvdri/received_events","type":"User","site_admin":false},"body":"didn't have all code from yesterday...","created_at":"2016-03-29T13:22:40Z","updated_at":"2016-03-29T17:52:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9296882a643dacf2c3b6643cb22194e009105738","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70/commits","review_comments_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70/comments","review_comment_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/issues/70/comments","statuses_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/statuses/afc590f95091361c1e59bf67f1e3a961132d3f12","head":{"label":"pvdri:response","ref":"response","sha":"afc590f95091361c1e59bf67f1e3a961132d3f12","user":{"login":"pvdri","id":13179185,"avatar_url":"https://avatars.githubusercontent.com/u/13179185?v=3","gravatar_id":"","url":"https://api.github.com/users/pvdri","html_url":"https://github.com/pvdri","followers_url":"https://api.github.com/users/pvdri/followers","following_url":"https://api.github.com/users/pvdri/following{/other_user}","gists_url":"https://api.github.com/users/pvdri/gists{/gist_id}","starred_url":"https://api.github.com/users/pvdri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvdri/subscriptions","organizations_url":"https://api.github.com/users/pvdri/orgs","repos_url":"https://api.github.com/users/pvdri/repos","events_url":"https://api.github.com/users/pvdri/events{/privacy}","received_events_url":"https://api.github.com/users/pvdri/received_events","type":"User","site_admin":false},"repo":{"id":54975987,"name":"js-array-methods-diagnostic","full_name":"pvdri/js-array-methods-diagnostic","owner":{"login":"pvdri","id":13179185,"avatar_url":"https://avatars.githubusercontent.com/u/13179185?v=3","gravatar_id":"","url":"https://api.github.com/users/pvdri","html_url":"https://github.com/pvdri","followers_url":"https://api.github.com/users/pvdri/followers","following_url":"https://api.github.com/users/pvdri/following{/other_user}","gists_url":"https://api.github.com/users/pvdri/gists{/gist_id}","starred_url":"https://api.github.com/users/pvdri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvdri/subscriptions","organizations_url":"https://api.github.com/users/pvdri/orgs","repos_url":"https://api.github.com/users/pvdri/repos","events_url":"https://api.github.com/users/pvdri/events{/privacy}","received_events_url":"https://api.github.com/users/pvdri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pvdri/js-array-methods-diagnostic","description":"Diagnostic for \"JavaScript Array methods\"","fork":true,"url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic","forks_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/forks","keys_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/teams","hooks_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/hooks","issue_events_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/issues/events{/number}","events_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/events","assignees_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/assignees{/user}","branches_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/branches{/branch}","tags_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/tags","blobs_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/git/refs{/sha}","trees_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/statuses/{sha}","languages_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/languages","stargazers_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/stargazers","contributors_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/contributors","subscribers_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/subscribers","subscription_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/subscription","commits_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/commits{/sha}","git_commits_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/git/commits{/sha}","comments_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/comments{/number}","issue_comment_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/issues/comments{/number}","contents_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/contents/{+path}","compare_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/merges","archive_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/downloads","issues_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/issues{/number}","pulls_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/pulls{/number}","milestones_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/milestones{/number}","notifications_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/labels{/name}","releases_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/releases{/id}","deployments_url":"https://api.github.com/repos/pvdri/js-array-methods-diagnostic/deployments","created_at":"2016-03-29T13:00:24Z","updated_at":"2016-03-29T13:00:24Z","pushed_at":"2016-03-29T13:22:16Z","git_url":"git://github.com/pvdri/js-array-methods-diagnostic.git","ssh_url":"git@github.com:pvdri/js-array-methods-diagnostic.git","clone_url":"https://github.com/pvdri/js-array-methods-diagnostic.git","svn_url":"https://github.com/pvdri/js-array-methods-diagnostic","homepage":"","size":16,"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":"ga-wdi-boston:master","ref":"master","sha":"5efceb087d998677efa8ff5314a60f2344e17963","user":{"login":"ga-wdi-boston","id":6361298,"avatar_url":"https://avatars.githubusercontent.com/u/6361298?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-boston","html_url":"https://github.com/ga-wdi-boston","followers_url":"https://api.github.com/users/ga-wdi-boston/followers","following_url":"https://api.github.com/users/ga-wdi-boston/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-boston/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-boston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-boston/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-boston/orgs","repos_url":"https://api.github.com/users/ga-wdi-boston/repos","events_url":"https://api.github.com/users/ga-wdi-boston/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-boston/received_events","type":"Organization","site_admin":false},"repo":{"id":43658172,"name":"js-array-methods-diagnostic","full_name":"ga-wdi-boston/js-array-methods-diagnostic","owner":{"login":"ga-wdi-boston","id":6361298,"avatar_url":"https://avatars.githubusercontent.com/u/6361298?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-boston","html_url":"https://github.com/ga-wdi-boston","followers_url":"https://api.github.com/users/ga-wdi-boston/followers","following_url":"https://api.github.com/users/ga-wdi-boston/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-boston/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-boston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-boston/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-boston/orgs","repos_url":"https://api.github.com/users/ga-wdi-boston/repos","events_url":"https://api.github.com/users/ga-wdi-boston/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-boston/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic","description":"Diagnostic for \"JavaScript Array methods\"","fork":false,"url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic","forks_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/forks","keys_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/teams","hooks_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/hooks","issue_events_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/issues/events{/number}","events_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/events","assignees_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/assignees{/user}","branches_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/branches{/branch}","tags_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/tags","blobs_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/languages","stargazers_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/stargazers","contributors_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/contributors","subscribers_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/subscribers","subscription_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/subscription","commits_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/contents/{+path}","compare_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/merges","archive_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/downloads","issues_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/issues{/number}","pulls_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/labels{/name}","releases_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/releases{/id}","deployments_url":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/deployments","created_at":"2015-10-05T00:25:39Z","updated_at":"2016-01-24T19:32:54Z","pushed_at":"2016-03-29T13:31:07Z","git_url":"git://github.com/ga-wdi-boston/js-array-methods-diagnostic.git","ssh_url":"git@github.com:ga-wdi-boston/js-array-methods-diagnostic.git","clone_url":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic.git","svn_url":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic","homepage":"","size":73,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":17,"forks":64,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70"},"html":{"href":"https://github.com/ga-wdi-boston/js-array-methods-diagnostic/pull/70"},"issue":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/issues/70"},"comments":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/ga-wdi-boston/js-array-methods-diagnostic/statuses/afc590f95091361c1e59bf67f1e3a961132d3f12"}}}}