{"action":"created","comment":{"url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/comments/140777330","pull_request_review_id":64897239,"id":140777330,"diff_hunk":"@@ -44,62 +81,102 @@ const isPrime = (num) => {\n   // hint: a prime number is only evenly divisible by itself and 1\n   // hint2: you can solve this using a for loop\n   // note: 0 and 1 are NOT considered prime numbers\n+\n+  if (num === 0 || num === 1) {\n+    return false;\n+  }\n+\n+  for (let i = num - 1; i > 1; i--) {\n+    if (num % i === 0) {\n+      return false;\n+    }\n+  }\n+\n+  return true;\n };\n \n const returnFirst = (arr) => {\n   // return the first item from the array\n+  return arr.shift();\n };\n \n const returnLast = (arr) => {\n   // return the last item of the array\n+  return arr.pop();\n };\n \n const getArrayLength = (arr) => {\n   // return the length of the array\n+  return arr.length;\n };\n \n const incrementByOne = (arr) => {\n   // arr is an array of integers\n   // increase each integer by one\n   // return the array\n+  const incrementedArray = arr.map(element => element += 1);\n+\n+  return incrementedArray;\n };\n \n const addItemToArray = (arr, item) => {\n   // add the item to the end of the array\n   // return the array\n+  arr.push(item);\n+\n+  return arr;\n };\n \n const addItemToFront = (arr, item) => {\n   // add the item to the front of the array\n   // return the array\n   // hint: use the array method .unshift\n+  arr.unshift(item);\n+\n+  return arr;\n };\n \n const wordsToSentence = (words) => {\n   // words is an array of strings\n   // return a string that is all of the words concatenated together\n   // spaces need to be between each word\n   // example: ['Hello', 'world!'] -> 'Hello world!'\n+\n+  return words.join(' ');","path":"src/project-2.js","position":139,"original_position":139,"commit_id":"0a8e868d6709aa67de95579474b84a6b134cf793","original_commit_id":"0a8e868d6709aa67de95579474b84a6b134cf793","user":{"login":"chichiwang","id":2304118,"avatar_url":"https://avatars3.githubusercontent.com/u/2304118?v=4","gravatar_id":"","url":"https://api.github.com/users/chichiwang","html_url":"https://github.com/chichiwang","followers_url":"https://api.github.com/users/chichiwang/followers","following_url":"https://api.github.com/users/chichiwang/following{/other_user}","gists_url":"https://api.github.com/users/chichiwang/gists{/gist_id}","starred_url":"https://api.github.com/users/chichiwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chichiwang/subscriptions","organizations_url":"https://api.github.com/users/chichiwang/orgs","repos_url":"https://api.github.com/users/chichiwang/repos","events_url":"https://api.github.com/users/chichiwang/events{/privacy}","received_events_url":"https://api.github.com/users/chichiwang/received_events","type":"User","site_admin":false},"body":"Opportunity for refactor - One-liner\r\n\r\n```javascript\r\nconst wordsToSentence = words => words.join(' ');\r\n```","created_at":"2017-09-25T13:37:40Z","updated_at":"2017-09-25T13:37:40Z","html_url":"https://github.com/paulghaddad/Basic-JavaScript/pull/1#discussion_r140777330","pull_request_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/comments/140777330"},"html":{"href":"https://github.com/paulghaddad/Basic-JavaScript/pull/1#discussion_r140777330"},"pull_request":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1","id":142865211,"html_url":"https://github.com/paulghaddad/Basic-JavaScript/pull/1","diff_url":"https://github.com/paulghaddad/Basic-JavaScript/pull/1.diff","patch_url":"https://github.com/paulghaddad/Basic-JavaScript/pull/1.patch","issue_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/1","number":1,"state":"open","locked":false,"title":"Solving Project 2 Problems","user":{"login":"paulghaddad","id":1412714,"avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-25T12:10:39Z","updated_at":"2017-09-25T13:37:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4b133b189a51626daf24fa56ed273d31abf79cc","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1/commits","review_comments_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1/comments","review_comment_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/1/comments","statuses_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/statuses/0a8e868d6709aa67de95579474b84a6b134cf793","head":{"label":"paulghaddad:project-2","ref":"project-2","sha":"0a8e868d6709aa67de95579474b84a6b134cf793","user":{"login":"paulghaddad","id":1412714,"avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false},"repo":{"id":104011649,"name":"Basic-JavaScript","full_name":"paulghaddad/Basic-JavaScript","owner":{"login":"paulghaddad","id":1412714,"avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulghaddad/Basic-JavaScript","description":null,"fork":true,"url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript","forks_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/forks","keys_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/teams","hooks_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/hooks","issue_events_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/events{/number}","events_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/events","assignees_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/assignees{/user}","branches_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/branches{/branch}","tags_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/tags","blobs_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/statuses/{sha}","languages_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/languages","stargazers_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/stargazers","contributors_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/contributors","subscribers_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/subscribers","subscription_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/subscription","commits_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/contents/{+path}","compare_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/merges","archive_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/downloads","issues_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues{/number}","pulls_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls{/number}","milestones_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/milestones{/number}","notifications_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/labels{/name}","releases_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/releases{/id}","deployments_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/deployments","created_at":"2017-09-19T01:42:40Z","updated_at":"2017-09-19T01:42:41Z","pushed_at":"2017-09-25T12:58:46Z","git_url":"git://github.com/paulghaddad/Basic-JavaScript.git","ssh_url":"git@github.com:paulghaddad/Basic-JavaScript.git","clone_url":"https://github.com/paulghaddad/Basic-JavaScript.git","svn_url":"https://github.com/paulghaddad/Basic-JavaScript","homepage":null,"size":58,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"paulghaddad:master","ref":"master","sha":"39e3b481abe1cd895ebe24d996740db0eab15997","user":{"login":"paulghaddad","id":1412714,"avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false},"repo":{"id":104011649,"name":"Basic-JavaScript","full_name":"paulghaddad/Basic-JavaScript","owner":{"login":"paulghaddad","id":1412714,"avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulghaddad/Basic-JavaScript","description":null,"fork":true,"url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript","forks_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/forks","keys_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/teams","hooks_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/hooks","issue_events_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/events{/number}","events_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/events","assignees_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/assignees{/user}","branches_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/branches{/branch}","tags_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/tags","blobs_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/statuses/{sha}","languages_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/languages","stargazers_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/stargazers","contributors_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/contributors","subscribers_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/subscribers","subscription_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/subscription","commits_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/contents/{+path}","compare_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/merges","archive_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/downloads","issues_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues{/number}","pulls_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls{/number}","milestones_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/milestones{/number}","notifications_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/labels{/name}","releases_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/releases{/id}","deployments_url":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/deployments","created_at":"2017-09-19T01:42:40Z","updated_at":"2017-09-19T01:42:41Z","pushed_at":"2017-09-25T12:58:46Z","git_url":"git://github.com/paulghaddad/Basic-JavaScript.git","ssh_url":"git@github.com:paulghaddad/Basic-JavaScript.git","clone_url":"https://github.com/paulghaddad/Basic-JavaScript.git","svn_url":"https://github.com/paulghaddad/Basic-JavaScript","homepage":null,"size":58,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1"},"html":{"href":"https://github.com/paulghaddad/Basic-JavaScript/pull/1"},"issue":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/1"},"comments":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/paulghaddad/Basic-JavaScript/statuses/0a8e868d6709aa67de95579474b84a6b134cf793"}},"author_association":"OWNER"}}
{"actor":{"display_login":"chichiwang"}}