{"action":"created","comment":{"url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/comments/207646600","pull_request_review_id":143309223,"id":207646600,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzY0NjYwMA==","diff_hunk":"@@ -7,11 +7,75 @@ const rl = readline.createInterface({\n   output: process.stdout\n });\n \n+// this will convert user input to all lowercase, and trim any whitespace\n+// returns a string\n+function sanitizeInput(userInput) {\n+  return userInput.toLowerCase().trim();\n+}\n+\n+// this function finds and returns the index of the first vowel in user input\n+// will return -1 if no vowels are found\n+function findFirstVowel(userInput) {\n+  // trim input of whitespace and convert to lowercase\n+  const sanitizedInput = sanitizeInput(userInput);\n+  // convert input string into array of chars\n+  const inputArr = sanitizedInput.split('');\n+  // return variable. will contain index of first vowel found\n+  let vowelIndex = -1;\n+\n+  // loop over user input array of chars\n+  for (let i = 0; i < inputArr.length; i++) {\n+    // check to see if current char is a vowel\n+    // if so, set vowelIndex and break out of loop\n+    if (inputArr[i] === 'a' || inputArr[i] === 'e' || inputArr[i] === 'i' || inputArr[i] === 'o' || inputArr[i] === 'u') {","path":"02week/pigLatin.js","position":24,"original_position":24,"commit_id":"ea591a280ea28e827ceec8e0119c7e1cdc500e97","original_commit_id":"ea591a280ea28e827ceec8e0119c7e1cdc500e97","user":{"login":"reneedudley","id":12837355,"node_id":"MDQ6VXNlcjEyODM3MzU1","avatar_url":"https://avatars0.githubusercontent.com/u/12837355?v=4","gravatar_id":"","url":"https://api.github.com/users/reneedudley","html_url":"https://github.com/reneedudley","followers_url":"https://api.github.com/users/reneedudley/followers","following_url":"https://api.github.com/users/reneedudley/following{/other_user}","gists_url":"https://api.github.com/users/reneedudley/gists{/gist_id}","starred_url":"https://api.github.com/users/reneedudley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reneedudley/subscriptions","organizations_url":"https://api.github.com/users/reneedudley/orgs","repos_url":"https://api.github.com/users/reneedudley/repos","events_url":"https://api.github.com/users/reneedudley/events{/privacy}","received_events_url":"https://api.github.com/users/reneedudley/received_events","type":"User","site_admin":false},"body":"This is repetitive, what's a better way to do this? ","created_at":"2018-08-03T19:35:27Z","updated_at":"2018-08-03T19:35:47Z","html_url":"https://github.com/jwaltrip/javascript-workbook/pull/3#discussion_r207646600","pull_request_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/comments/207646600"},"html":{"href":"https://github.com/jwaltrip/javascript-workbook/pull/3#discussion_r207646600"},"pull_request":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3","id":204002465,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MDAyNDY1","html_url":"https://github.com/jwaltrip/javascript-workbook/pull/3","diff_url":"https://github.com/jwaltrip/javascript-workbook/pull/3.diff","patch_url":"https://github.com/jwaltrip/javascript-workbook/pull/3.patch","issue_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/3","number":3,"state":"open","locked":false,"title":"finished pig latin assignment","user":{"login":"jwaltrip","id":6855377,"node_id":"MDQ6VXNlcjY4NTUzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/6855377?v=4","gravatar_id":"","url":"https://api.github.com/users/jwaltrip","html_url":"https://github.com/jwaltrip","followers_url":"https://api.github.com/users/jwaltrip/followers","following_url":"https://api.github.com/users/jwaltrip/following{/other_user}","gists_url":"https://api.github.com/users/jwaltrip/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaltrip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaltrip/subscriptions","organizations_url":"https://api.github.com/users/jwaltrip/orgs","repos_url":"https://api.github.com/users/jwaltrip/repos","events_url":"https://api.github.com/users/jwaltrip/events{/privacy}","received_events_url":"https://api.github.com/users/jwaltrip/received_events","type":"User","site_admin":false},"body":"## Checkpoint Rubric\r\nThis is the rubric that your instructor will use to grade your checkpoints. Please do not edit. \r\n\r\n**Checkpoint 1**\r\n- [ ] All tests passed: 40 points\r\n- [ ] Proper use of documentation (commenting on code): 15 points\r\n- [ ] Properly indented code: 15 points\r\n- [ ] Demonstrated effective use of JavaScript: 30 points\r\n\r\n**Checkpoint 2**\r\n- [ ] The application works as it should: 40 points\r\n- [ ] Proper use of documentation (commenting on code): 15 points\r\n- [ ] Properly indented code: 15 points\r\n- [ ] Demonstrated effective use of JavaScript and the DOM API: 30 points\r\n\r\n**Checkpoint 3**\r\n- [ ] Use of React: 25 points\r\n- [ ] Accesses an API: 25 points\r\n- [ ] Proper use of documentation (commenting on code): 25 points\r\n- [ ] The application functions as it should: 25 points\r\n","created_at":"2018-07-26T01:04:22Z","updated_at":"2018-08-03T19:35:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3387e40ba9bc048d1cd90203af6e3d536285cfb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3/commits","review_comments_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3/comments","review_comment_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/3/comments","statuses_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/statuses/ea591a280ea28e827ceec8e0119c7e1cdc500e97","head":{"label":"jwaltrip:class3-pigLatin","ref":"class3-pigLatin","sha":"ea591a280ea28e827ceec8e0119c7e1cdc500e97","user":{"login":"jwaltrip","id":6855377,"node_id":"MDQ6VXNlcjY4NTUzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/6855377?v=4","gravatar_id":"","url":"https://api.github.com/users/jwaltrip","html_url":"https://github.com/jwaltrip","followers_url":"https://api.github.com/users/jwaltrip/followers","following_url":"https://api.github.com/users/jwaltrip/following{/other_user}","gists_url":"https://api.github.com/users/jwaltrip/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaltrip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaltrip/subscriptions","organizations_url":"https://api.github.com/users/jwaltrip/orgs","repos_url":"https://api.github.com/users/jwaltrip/repos","events_url":"https://api.github.com/users/jwaltrip/events{/privacy}","received_events_url":"https://api.github.com/users/jwaltrip/received_events","type":"User","site_admin":false},"repo":{"id":140990769,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA5OTA3Njk=","name":"javascript-workbook","full_name":"jwaltrip/javascript-workbook","owner":{"login":"jwaltrip","id":6855377,"node_id":"MDQ6VXNlcjY4NTUzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/6855377?v=4","gravatar_id":"","url":"https://api.github.com/users/jwaltrip","html_url":"https://github.com/jwaltrip","followers_url":"https://api.github.com/users/jwaltrip/followers","following_url":"https://api.github.com/users/jwaltrip/following{/other_user}","gists_url":"https://api.github.com/users/jwaltrip/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaltrip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaltrip/subscriptions","organizations_url":"https://api.github.com/users/jwaltrip/orgs","repos_url":"https://api.github.com/users/jwaltrip/repos","events_url":"https://api.github.com/users/jwaltrip/events{/privacy}","received_events_url":"https://api.github.com/users/jwaltrip/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jwaltrip/javascript-workbook","description":"https://austincodingacademy.github.io/javascript-workbook","fork":true,"url":"https://api.github.com/repos/jwaltrip/javascript-workbook","forks_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/forks","keys_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/teams","hooks_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/hooks","issue_events_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/events{/number}","events_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/events","assignees_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/assignees{/user}","branches_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/branches{/branch}","tags_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/tags","blobs_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/statuses/{sha}","languages_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/languages","stargazers_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/stargazers","contributors_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/contributors","subscribers_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/subscribers","subscription_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/subscription","commits_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/contents/{+path}","compare_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/merges","archive_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/downloads","issues_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues{/number}","pulls_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls{/number}","milestones_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/milestones{/number}","notifications_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/labels{/name}","releases_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/releases{/id}","deployments_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/deployments","created_at":"2018-07-15T01:52:58Z","updated_at":"2018-08-01T21:32:48Z","pushed_at":"2018-08-03T00:25:55Z","git_url":"git://github.com/jwaltrip/javascript-workbook.git","ssh_url":"git@github.com:jwaltrip/javascript-workbook.git","clone_url":"https://github.com/jwaltrip/javascript-workbook.git","svn_url":"https://github.com/jwaltrip/javascript-workbook","homepage":"","size":398,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"jwaltrip:gh-pages","ref":"gh-pages","sha":"fa9a76bab838f9954e49a21cc1aa01a3ad9b9195","user":{"login":"jwaltrip","id":6855377,"node_id":"MDQ6VXNlcjY4NTUzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/6855377?v=4","gravatar_id":"","url":"https://api.github.com/users/jwaltrip","html_url":"https://github.com/jwaltrip","followers_url":"https://api.github.com/users/jwaltrip/followers","following_url":"https://api.github.com/users/jwaltrip/following{/other_user}","gists_url":"https://api.github.com/users/jwaltrip/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaltrip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaltrip/subscriptions","organizations_url":"https://api.github.com/users/jwaltrip/orgs","repos_url":"https://api.github.com/users/jwaltrip/repos","events_url":"https://api.github.com/users/jwaltrip/events{/privacy}","received_events_url":"https://api.github.com/users/jwaltrip/received_events","type":"User","site_admin":false},"repo":{"id":140990769,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA5OTA3Njk=","name":"javascript-workbook","full_name":"jwaltrip/javascript-workbook","owner":{"login":"jwaltrip","id":6855377,"node_id":"MDQ6VXNlcjY4NTUzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/6855377?v=4","gravatar_id":"","url":"https://api.github.com/users/jwaltrip","html_url":"https://github.com/jwaltrip","followers_url":"https://api.github.com/users/jwaltrip/followers","following_url":"https://api.github.com/users/jwaltrip/following{/other_user}","gists_url":"https://api.github.com/users/jwaltrip/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaltrip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaltrip/subscriptions","organizations_url":"https://api.github.com/users/jwaltrip/orgs","repos_url":"https://api.github.com/users/jwaltrip/repos","events_url":"https://api.github.com/users/jwaltrip/events{/privacy}","received_events_url":"https://api.github.com/users/jwaltrip/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jwaltrip/javascript-workbook","description":"https://austincodingacademy.github.io/javascript-workbook","fork":true,"url":"https://api.github.com/repos/jwaltrip/javascript-workbook","forks_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/forks","keys_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/teams","hooks_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/hooks","issue_events_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/events{/number}","events_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/events","assignees_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/assignees{/user}","branches_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/branches{/branch}","tags_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/tags","blobs_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/statuses/{sha}","languages_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/languages","stargazers_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/stargazers","contributors_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/contributors","subscribers_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/subscribers","subscription_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/subscription","commits_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/contents/{+path}","compare_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/merges","archive_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/downloads","issues_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues{/number}","pulls_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls{/number}","milestones_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/milestones{/number}","notifications_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/labels{/name}","releases_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/releases{/id}","deployments_url":"https://api.github.com/repos/jwaltrip/javascript-workbook/deployments","created_at":"2018-07-15T01:52:58Z","updated_at":"2018-08-01T21:32:48Z","pushed_at":"2018-08-03T00:25:55Z","git_url":"git://github.com/jwaltrip/javascript-workbook.git","ssh_url":"git@github.com:jwaltrip/javascript-workbook.git","clone_url":"https://github.com/jwaltrip/javascript-workbook.git","svn_url":"https://github.com/jwaltrip/javascript-workbook","homepage":"","size":398,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3"},"html":{"href":"https://github.com/jwaltrip/javascript-workbook/pull/3"},"issue":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/3"},"comments":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/jwaltrip/javascript-workbook/statuses/ea591a280ea28e827ceec8e0119c7e1cdc500e97"}},"author_association":"OWNER"}}
{"actor":{"display_login":"reneedudley"}}