{"action":"created","comment":{"url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/comments/81177239","pull_request_review_id":2176737,"id":81177239,"diff_hunk":"@@ -47,13 +110,21 @@\n \n <!-- Add your Javascript to this script tag -->\n <script language=\"javascript\">\n-  console.log(\"I am Javascript!\");\n \n-  var profile_values = document.getElementsByClassName('profile-value');\n-  var total_words = 0;\n+  function countWords(){\n+  \n+    var profile_values = document.getElementsByClassName(\"profile-value\");\n+  \n+    var total_words = 0;\n+  \n+    for(var i = 0; i < profile_values.length; i++)\n+    {\n+        total_words += profile_values[i].innerHTML.split(' ').length;","path":"views/index.erb","position":135,"original_position":135,"commit_id":"3b3eea0f5c66f806c8384e49a799a64d2aa4f9a2","original_commit_id":"3b3eea0f5c66f806c8384e49a799a64d2aa4f9a2","user":{"login":"dmgarland","id":133712,"avatar_url":"https://avatars.githubusercontent.com/u/133712?v=3","gravatar_id":"","url":"https://api.github.com/users/dmgarland","html_url":"https://github.com/dmgarland","followers_url":"https://api.github.com/users/dmgarland/followers","following_url":"https://api.github.com/users/dmgarland/following{/other_user}","gists_url":"https://api.github.com/users/dmgarland/gists{/gist_id}","starred_url":"https://api.github.com/users/dmgarland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmgarland/subscriptions","organizations_url":"https://api.github.com/users/dmgarland/orgs","repos_url":"https://api.github.com/users/dmgarland/repos","events_url":"https://api.github.com/users/dmgarland/events{/privacy}","received_events_url":"https://api.github.com/users/dmgarland/received_events","type":"User","site_admin":false},"body":"I see where you're going with this. Trouble is you might find that some of these values have whitespace in them, which might confuse split. Have a look at `profile_values[0].innerHTML.split(' ')` in your chrome console. Do you see any whitespace in there ? If so take a look at what `trim()` does and whether it can make your calculation more accurate.","created_at":"2016-09-29T16:25:07Z","updated_at":"2016-09-29T16:25:07Z","html_url":"https://github.com/wegotcoders/wgc_groundwork/pull/65#discussion_r81177239","pull_request_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/comments/81177239"},"html":{"href":"https://github.com/wegotcoders/wgc_groundwork/pull/65#discussion_r81177239"},"pull_request":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65","id":87270692,"html_url":"https://github.com/wegotcoders/wgc_groundwork/pull/65","diff_url":"https://github.com/wegotcoders/wgc_groundwork/pull/65.diff","patch_url":"https://github.com/wegotcoders/wgc_groundwork/pull/65.patch","issue_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/issues/65","number":65,"state":"open","locked":false,"title":"My code challenge","user":{"login":"georgeheap","id":19361390,"avatar_url":"https://avatars.githubusercontent.com/u/19361390?v=3","gravatar_id":"","url":"https://api.github.com/users/georgeheap","html_url":"https://github.com/georgeheap","followers_url":"https://api.github.com/users/georgeheap/followers","following_url":"https://api.github.com/users/georgeheap/following{/other_user}","gists_url":"https://api.github.com/users/georgeheap/gists{/gist_id}","starred_url":"https://api.github.com/users/georgeheap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgeheap/subscriptions","organizations_url":"https://api.github.com/users/georgeheap/orgs","repos_url":"https://api.github.com/users/georgeheap/repos","events_url":"https://api.github.com/users/georgeheap/events{/privacy}","received_events_url":"https://api.github.com/users/georgeheap/received_events","type":"User","site_admin":false},"body":"Best I can do at the moment.","created_at":"2016-09-29T08:52:59Z","updated_at":"2016-09-29T16:25:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe9937d442addfafdd510e6b8c9a5fed09ea8f08","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65/commits","review_comments_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65/comments","review_comment_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/issues/65/comments","statuses_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/statuses/3b3eea0f5c66f806c8384e49a799a64d2aa4f9a2","head":{"label":"georgeheap:master","ref":"master","sha":"3b3eea0f5c66f806c8384e49a799a64d2aa4f9a2","user":{"login":"georgeheap","id":19361390,"avatar_url":"https://avatars.githubusercontent.com/u/19361390?v=3","gravatar_id":"","url":"https://api.github.com/users/georgeheap","html_url":"https://github.com/georgeheap","followers_url":"https://api.github.com/users/georgeheap/followers","following_url":"https://api.github.com/users/georgeheap/following{/other_user}","gists_url":"https://api.github.com/users/georgeheap/gists{/gist_id}","starred_url":"https://api.github.com/users/georgeheap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgeheap/subscriptions","organizations_url":"https://api.github.com/users/georgeheap/orgs","repos_url":"https://api.github.com/users/georgeheap/repos","events_url":"https://api.github.com/users/georgeheap/events{/privacy}","received_events_url":"https://api.github.com/users/georgeheap/received_events","type":"User","site_admin":false},"repo":{"id":67895685,"name":"wgc_groundwork","full_name":"georgeheap/wgc_groundwork","owner":{"login":"georgeheap","id":19361390,"avatar_url":"https://avatars.githubusercontent.com/u/19361390?v=3","gravatar_id":"","url":"https://api.github.com/users/georgeheap","html_url":"https://github.com/georgeheap","followers_url":"https://api.github.com/users/georgeheap/followers","following_url":"https://api.github.com/users/georgeheap/following{/other_user}","gists_url":"https://api.github.com/users/georgeheap/gists{/gist_id}","starred_url":"https://api.github.com/users/georgeheap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgeheap/subscriptions","organizations_url":"https://api.github.com/users/georgeheap/orgs","repos_url":"https://api.github.com/users/georgeheap/repos","events_url":"https://api.github.com/users/georgeheap/events{/privacy}","received_events_url":"https://api.github.com/users/georgeheap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/georgeheap/wgc_groundwork","description":"We Got Coders Profile Viewer - Programming Challenge","fork":true,"url":"https://api.github.com/repos/georgeheap/wgc_groundwork","forks_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/forks","keys_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/teams","hooks_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/hooks","issue_events_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/issues/events{/number}","events_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/events","assignees_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/assignees{/user}","branches_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/branches{/branch}","tags_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/tags","blobs_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/statuses/{sha}","languages_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/languages","stargazers_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/stargazers","contributors_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/contributors","subscribers_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/subscribers","subscription_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/subscription","commits_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/contents/{+path}","compare_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/merges","archive_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/downloads","issues_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/issues{/number}","pulls_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/pulls{/number}","milestones_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/milestones{/number}","notifications_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/labels{/name}","releases_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/releases{/id}","deployments_url":"https://api.github.com/repos/georgeheap/wgc_groundwork/deployments","created_at":"2016-09-10T21:35:59Z","updated_at":"2016-09-29T08:50:15Z","pushed_at":"2016-09-29T08:50:13Z","git_url":"git://github.com/georgeheap/wgc_groundwork.git","ssh_url":"git@github.com:georgeheap/wgc_groundwork.git","clone_url":"https://github.com/georgeheap/wgc_groundwork.git","svn_url":"https://github.com/georgeheap/wgc_groundwork","homepage":null,"size":139,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"wegotcoders:master","ref":"master","sha":"d6233b69e49fba6a31d92e901a1d1ae4dbc1fbf2","user":{"login":"wegotcoders","id":5376033,"avatar_url":"https://avatars.githubusercontent.com/u/5376033?v=3","gravatar_id":"","url":"https://api.github.com/users/wegotcoders","html_url":"https://github.com/wegotcoders","followers_url":"https://api.github.com/users/wegotcoders/followers","following_url":"https://api.github.com/users/wegotcoders/following{/other_user}","gists_url":"https://api.github.com/users/wegotcoders/gists{/gist_id}","starred_url":"https://api.github.com/users/wegotcoders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wegotcoders/subscriptions","organizations_url":"https://api.github.com/users/wegotcoders/orgs","repos_url":"https://api.github.com/users/wegotcoders/repos","events_url":"https://api.github.com/users/wegotcoders/events{/privacy}","received_events_url":"https://api.github.com/users/wegotcoders/received_events","type":"Organization","site_admin":false},"repo":{"id":16459176,"name":"wgc_groundwork","full_name":"wegotcoders/wgc_groundwork","owner":{"login":"wegotcoders","id":5376033,"avatar_url":"https://avatars.githubusercontent.com/u/5376033?v=3","gravatar_id":"","url":"https://api.github.com/users/wegotcoders","html_url":"https://github.com/wegotcoders","followers_url":"https://api.github.com/users/wegotcoders/followers","following_url":"https://api.github.com/users/wegotcoders/following{/other_user}","gists_url":"https://api.github.com/users/wegotcoders/gists{/gist_id}","starred_url":"https://api.github.com/users/wegotcoders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wegotcoders/subscriptions","organizations_url":"https://api.github.com/users/wegotcoders/orgs","repos_url":"https://api.github.com/users/wegotcoders/repos","events_url":"https://api.github.com/users/wegotcoders/events{/privacy}","received_events_url":"https://api.github.com/users/wegotcoders/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wegotcoders/wgc_groundwork","description":"We Got Coders Profile Viewer - Programming Challenge","fork":false,"url":"https://api.github.com/repos/wegotcoders/wgc_groundwork","forks_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/forks","keys_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/teams","hooks_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/hooks","issue_events_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/issues/events{/number}","events_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/events","assignees_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/assignees{/user}","branches_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/branches{/branch}","tags_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/tags","blobs_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/statuses/{sha}","languages_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/languages","stargazers_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/stargazers","contributors_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/contributors","subscribers_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/subscribers","subscription_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/subscription","commits_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/contents/{+path}","compare_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/merges","archive_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/downloads","issues_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/issues{/number}","pulls_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls{/number}","milestones_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/milestones{/number}","notifications_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/labels{/name}","releases_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/releases{/id}","deployments_url":"https://api.github.com/repos/wegotcoders/wgc_groundwork/deployments","created_at":"2014-02-02T17:37:24Z","updated_at":"2016-07-14T12:29:37Z","pushed_at":"2016-09-29T08:52:59Z","git_url":"git://github.com/wegotcoders/wgc_groundwork.git","ssh_url":"git@github.com:wegotcoders/wgc_groundwork.git","clone_url":"https://github.com/wegotcoders/wgc_groundwork.git","svn_url":"https://github.com/wegotcoders/wgc_groundwork","homepage":null,"size":58943,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":1,"forks":78,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65"},"html":{"href":"https://github.com/wegotcoders/wgc_groundwork/pull/65"},"issue":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/issues/65"},"comments":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/wegotcoders/wgc_groundwork/statuses/3b3eea0f5c66f806c8384e49a799a64d2aa4f9a2"}}}}
{"actor":{"display_login":"dmgarland"}}