{"action":"created","comment":{"url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/comments/26007801","id":26007801,"diff_hunk":"@@ -110,27 +161,62 @@ assert((new Human()).sayHello(new Klingon()) === \"nuqneH\",\n // assertions for each one\n //*********************************************************\n function lastLetterSort(stringArray) {\n-  function byLastLetter(array) {\n-    //TODO: implement me. sort the strings in alphabetical\n-    // order using their last letter\n-    // read this: http://www.w3schools.com/jsref/jsref_sort.asp\n+function byLastLetter(array) {\n+  this.array = array;\n+  for (var i = 0; i < array.length; i++) {\n+    array.splice(i, 1, array[i].split(\"\").reverse().join(\"\"));\n   }\n-  stringArray.sort(byLastLetter);\n+  return array;\n }\n \n-function sumArray(numberArray) {\n+byLastLetter(stringArray).sort();\n+byLastLetter(stringArray);\n+return stringArray;\n+}\n+\n+var myString = [\n+\"javascript\", \"b\", \"d\", \"z\", \"ruby\", \"python\", \"jquery\", \"php\", \"java\", \"c\", \"cplusplus\"\n+];\n+\n+lastLetterSort(myString);\n+\n+assert(myString[0] === \"java\", \"error\");\n+assert(myString[myString.length - 1] === \"z\", \"error\");\n+\n+function sumArray(array) {\n   var sum = 0;\n+  array.forEach(function add(value) {\n+    sum += value;\n+  });\n   // TODO: implement me using forEach\n   return sum;\n }\n \n+var numberArray = [ 1, 2, 3 ];\n+var numberArray2 = [ 11, 19, 20 ];\n+var numberArray3 = [ [ 1, 3, 2 ], [ 12, 4, 20 ], [ 0, 0, 1 ], [ 0, 0, 0 ], [ 100, 100, 100 ] ];\n+\n+assert(sumArray(numberArray) === 6, \"error\");\n+assert(sumArray(numberArray2) === 50, \"error\");\n+\n function sumSort(arrayOfArrays) {\n-  arrayOfArrays.sort(function(item) {\n-    // TODO: implement me using sumArray\n-    //  order the arrays based on the sum of the numbers\n-    //  inside each array\n+  arrayOfArrays.sort(function(a, b) {\n+    return sumArray(a) - sumArray(b);","path":"lab2.js","position":167,"original_position":167,"commit_id":"72d6dc9cb79026f9797c46f4b50c4487fad55186","original_commit_id":"72d6dc9cb79026f9797c46f4b50c4487fad55186","user":{"login":"stephanielingwood","id":7757711,"avatar_url":"https://avatars.githubusercontent.com/u/7757711?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanielingwood","html_url":"https://github.com/stephanielingwood","followers_url":"https://api.github.com/users/stephanielingwood/followers","following_url":"https://api.github.com/users/stephanielingwood/following{/other_user}","gists_url":"https://api.github.com/users/stephanielingwood/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanielingwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanielingwood/subscriptions","organizations_url":"https://api.github.com/users/stephanielingwood/orgs","repos_url":"https://api.github.com/users/stephanielingwood/repos","events_url":"https://api.github.com/users/stephanielingwood/events{/privacy}","received_events_url":"https://api.github.com/users/stephanielingwood/received_events","type":"User","site_admin":false},"body":"nice, clean implementation of the compare function","created_at":"2015-03-08T19:02:25Z","updated_at":"2015-03-08T19:02:25Z","html_url":"https://github.com/Raindeezy/feb-lab2-adv-track/pull/1#discussion_r26007801","pull_request_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/comments/26007801"},"html":{"href":"https://github.com/Raindeezy/feb-lab2-adv-track/pull/1#discussion_r26007801"},"pull_request":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1","id":30606394,"html_url":"https://github.com/Raindeezy/feb-lab2-adv-track/pull/1","diff_url":"https://github.com/Raindeezy/feb-lab2-adv-track/pull/1.diff","patch_url":"https://github.com/Raindeezy/feb-lab2-adv-track/pull/1.patch","issue_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/1","number":1,"state":"open","locked":false,"title":"finished lab2","user":{"login":"Raindeezy","id":10455065,"avatar_url":"https://avatars.githubusercontent.com/u/10455065?v=3","gravatar_id":"","url":"https://api.github.com/users/Raindeezy","html_url":"https://github.com/Raindeezy","followers_url":"https://api.github.com/users/Raindeezy/followers","following_url":"https://api.github.com/users/Raindeezy/following{/other_user}","gists_url":"https://api.github.com/users/Raindeezy/gists{/gist_id}","starred_url":"https://api.github.com/users/Raindeezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raindeezy/subscriptions","organizations_url":"https://api.github.com/users/Raindeezy/orgs","repos_url":"https://api.github.com/users/Raindeezy/repos","events_url":"https://api.github.com/users/Raindeezy/events{/privacy}","received_events_url":"https://api.github.com/users/Raindeezy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-05T23:19:01Z","updated_at":"2015-03-08T19:02:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6db4365d7a4702d809be52d17a1252a1bcc1597b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/1/comments","statuses_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/statuses/72d6dc9cb79026f9797c46f4b50c4487fad55186","head":{"label":"Raindeezy:raindeezy","ref":"raindeezy","sha":"72d6dc9cb79026f9797c46f4b50c4487fad55186","user":{"login":"Raindeezy","id":10455065,"avatar_url":"https://avatars.githubusercontent.com/u/10455065?v=3","gravatar_id":"","url":"https://api.github.com/users/Raindeezy","html_url":"https://github.com/Raindeezy","followers_url":"https://api.github.com/users/Raindeezy/followers","following_url":"https://api.github.com/users/Raindeezy/following{/other_user}","gists_url":"https://api.github.com/users/Raindeezy/gists{/gist_id}","starred_url":"https://api.github.com/users/Raindeezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raindeezy/subscriptions","organizations_url":"https://api.github.com/users/Raindeezy/orgs","repos_url":"https://api.github.com/users/Raindeezy/repos","events_url":"https://api.github.com/users/Raindeezy/events{/privacy}","received_events_url":"https://api.github.com/users/Raindeezy/received_events","type":"User","site_admin":false},"repo":{"id":31741674,"name":"feb-lab2-adv-track","full_name":"Raindeezy/feb-lab2-adv-track","owner":{"login":"Raindeezy","id":10455065,"avatar_url":"https://avatars.githubusercontent.com/u/10455065?v=3","gravatar_id":"","url":"https://api.github.com/users/Raindeezy","html_url":"https://github.com/Raindeezy","followers_url":"https://api.github.com/users/Raindeezy/followers","following_url":"https://api.github.com/users/Raindeezy/following{/other_user}","gists_url":"https://api.github.com/users/Raindeezy/gists{/gist_id}","starred_url":"https://api.github.com/users/Raindeezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raindeezy/subscriptions","organizations_url":"https://api.github.com/users/Raindeezy/orgs","repos_url":"https://api.github.com/users/Raindeezy/repos","events_url":"https://api.github.com/users/Raindeezy/events{/privacy}","received_events_url":"https://api.github.com/users/Raindeezy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Raindeezy/feb-lab2-adv-track","description":"","fork":true,"url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track","forks_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/forks","keys_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/teams","hooks_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/hooks","issue_events_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/events{/number}","events_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/events","assignees_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/assignees{/user}","branches_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/branches{/branch}","tags_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/tags","blobs_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/refs{/sha}","trees_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/statuses/{sha}","languages_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/languages","stargazers_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/stargazers","contributors_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/contributors","subscribers_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/subscribers","subscription_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/subscription","commits_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/commits{/sha}","git_commits_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/commits{/sha}","comments_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/comments{/number}","issue_comment_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/comments{/number}","contents_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/contents/{+path}","compare_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/merges","archive_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/downloads","issues_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues{/number}","pulls_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls{/number}","milestones_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/milestones{/number}","notifications_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/labels{/name}","releases_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/releases{/id}","created_at":"2015-03-05T23:04:53Z","updated_at":"2015-03-05T23:04:54Z","pushed_at":"2015-03-05T23:14:39Z","git_url":"git://github.com/Raindeezy/feb-lab2-adv-track.git","ssh_url":"git@github.com:Raindeezy/feb-lab2-adv-track.git","clone_url":"https://github.com/Raindeezy/feb-lab2-adv-track.git","svn_url":"https://github.com/Raindeezy/feb-lab2-adv-track","homepage":null,"size":134,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Raindeezy:master","ref":"master","sha":"14ff38c554cb09323d70a43b41dced387a30a7fb","user":{"login":"Raindeezy","id":10455065,"avatar_url":"https://avatars.githubusercontent.com/u/10455065?v=3","gravatar_id":"","url":"https://api.github.com/users/Raindeezy","html_url":"https://github.com/Raindeezy","followers_url":"https://api.github.com/users/Raindeezy/followers","following_url":"https://api.github.com/users/Raindeezy/following{/other_user}","gists_url":"https://api.github.com/users/Raindeezy/gists{/gist_id}","starred_url":"https://api.github.com/users/Raindeezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raindeezy/subscriptions","organizations_url":"https://api.github.com/users/Raindeezy/orgs","repos_url":"https://api.github.com/users/Raindeezy/repos","events_url":"https://api.github.com/users/Raindeezy/events{/privacy}","received_events_url":"https://api.github.com/users/Raindeezy/received_events","type":"User","site_admin":false},"repo":{"id":31741674,"name":"feb-lab2-adv-track","full_name":"Raindeezy/feb-lab2-adv-track","owner":{"login":"Raindeezy","id":10455065,"avatar_url":"https://avatars.githubusercontent.com/u/10455065?v=3","gravatar_id":"","url":"https://api.github.com/users/Raindeezy","html_url":"https://github.com/Raindeezy","followers_url":"https://api.github.com/users/Raindeezy/followers","following_url":"https://api.github.com/users/Raindeezy/following{/other_user}","gists_url":"https://api.github.com/users/Raindeezy/gists{/gist_id}","starred_url":"https://api.github.com/users/Raindeezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raindeezy/subscriptions","organizations_url":"https://api.github.com/users/Raindeezy/orgs","repos_url":"https://api.github.com/users/Raindeezy/repos","events_url":"https://api.github.com/users/Raindeezy/events{/privacy}","received_events_url":"https://api.github.com/users/Raindeezy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Raindeezy/feb-lab2-adv-track","description":"","fork":true,"url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track","forks_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/forks","keys_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/teams","hooks_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/hooks","issue_events_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/events{/number}","events_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/events","assignees_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/assignees{/user}","branches_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/branches{/branch}","tags_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/tags","blobs_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/refs{/sha}","trees_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/statuses/{sha}","languages_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/languages","stargazers_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/stargazers","contributors_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/contributors","subscribers_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/subscribers","subscription_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/subscription","commits_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/commits{/sha}","git_commits_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/git/commits{/sha}","comments_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/comments{/number}","issue_comment_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/comments{/number}","contents_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/contents/{+path}","compare_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/merges","archive_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/downloads","issues_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues{/number}","pulls_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls{/number}","milestones_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/milestones{/number}","notifications_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/labels{/name}","releases_url":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/releases{/id}","created_at":"2015-03-05T23:04:53Z","updated_at":"2015-03-05T23:04:54Z","pushed_at":"2015-03-05T23:14:39Z","git_url":"git://github.com/Raindeezy/feb-lab2-adv-track.git","ssh_url":"git@github.com:Raindeezy/feb-lab2-adv-track.git","clone_url":"https://github.com/Raindeezy/feb-lab2-adv-track.git","svn_url":"https://github.com/Raindeezy/feb-lab2-adv-track","homepage":null,"size":134,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1"},"html":{"href":"https://github.com/Raindeezy/feb-lab2-adv-track/pull/1"},"issue":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/1"},"comments":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Raindeezy/feb-lab2-adv-track/statuses/72d6dc9cb79026f9797c46f4b50c4487fad55186"}}}}