{"action":"created","comment":{"url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/comments/67541992","id":67541992,"diff_hunk":"@@ -1,17 +1,28 @@\n-// Define the Artist constructor function here, with a 'name' property that can be set at instantiation,\n-// and a 'songs' property that is an empty array to start\n-function Artist() {\n-\n+function Artist(name) {\n+  this.name = name;\n+  this.songs = [];\n }\n \n-// Define the Song constructor function here, with 'title' and 'artist' properties that can be set at instantiation,\n-// and a 'playCount' property that is an empty array to start\n-function Song() {\n-\n-  // When a new song is instantiated, you'll want to add that song to its artist's 'songs' array.\n-  // You'll probably want to do that in here somewhere...\n+function Song(title, artist) {\n+  this.title = title;\n+  this.artist = artist;\n+  this.playCount = 0;\n+  Artist.prototype.add = function(title) {\n+    this.songs.push(title)\n+  }\n+  artist.add(title);","path":"music.js","position":23,"original_position":23,"commit_id":"eef432d7cb583aa8bd7c6c07c2013b0220543894","original_commit_id":"eef432d7cb583aa8bd7c6c07c2013b0220543894","user":{"login":"seans887","id":1759866,"avatar_url":"https://avatars.githubusercontent.com/u/1759866?v=3","gravatar_id":"","url":"https://api.github.com/users/seans887","html_url":"https://github.com/seans887","followers_url":"https://api.github.com/users/seans887/followers","following_url":"https://api.github.com/users/seans887/following{/other_user}","gists_url":"https://api.github.com/users/seans887/gists{/gist_id}","starred_url":"https://api.github.com/users/seans887/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seans887/subscriptions","organizations_url":"https://api.github.com/users/seans887/orgs","repos_url":"https://api.github.com/users/seans887/repos","events_url":"https://api.github.com/users/seans887/events{/privacy}","received_events_url":"https://api.github.com/users/seans887/received_events","type":"User","site_admin":false},"body":"You probably want to refer to `this.artist` here, not just `artist`. Both will work in this scenario, but since we already went to the trouble of creating a property for this purpose, we should probably use it. In general, in a constructor function when you accept arguments to set as properties on the object, you don't use the arguments after they've been set as properties. This way, you preserve a 'single source of truth', so you always know what the authoritative piece of data is.","created_at":"2016-06-17T16:57:31Z","updated_at":"2016-06-17T16:57:31Z","html_url":"https://github.com/generalassembly-atx/music_artist_oop_relationships/pull/5#discussion_r67541992","pull_request_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/comments/67541992"},"html":{"href":"https://github.com/generalassembly-atx/music_artist_oop_relationships/pull/5#discussion_r67541992"},"pull_request":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5","id":74014154,"html_url":"https://github.com/generalassembly-atx/music_artist_oop_relationships/pull/5","diff_url":"https://github.com/generalassembly-atx/music_artist_oop_relationships/pull/5.diff","patch_url":"https://github.com/generalassembly-atx/music_artist_oop_relationships/pull/5.patch","issue_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/issues/5","number":5,"state":"open","locked":false,"title":"Finished the vanhalens","user":{"login":"zrgaines","id":11656952,"avatar_url":"https://avatars.githubusercontent.com/u/11656952?v=3","gravatar_id":"","url":"https://api.github.com/users/zrgaines","html_url":"https://github.com/zrgaines","followers_url":"https://api.github.com/users/zrgaines/followers","following_url":"https://api.github.com/users/zrgaines/following{/other_user}","gists_url":"https://api.github.com/users/zrgaines/gists{/gist_id}","starred_url":"https://api.github.com/users/zrgaines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zrgaines/subscriptions","organizations_url":"https://api.github.com/users/zrgaines/orgs","repos_url":"https://api.github.com/users/zrgaines/repos","events_url":"https://api.github.com/users/zrgaines/events{/privacy}","received_events_url":"https://api.github.com/users/zrgaines/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-16T02:37:49Z","updated_at":"2016-06-17T16:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d332c8064478cf488a8f620a3296e56213c1067c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5/commits","review_comments_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5/comments","review_comment_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/comments{/number}","comments_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/issues/5/comments","statuses_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/statuses/eef432d7cb583aa8bd7c6c07c2013b0220543894","head":{"label":"zrgaines:master","ref":"master","sha":"eef432d7cb583aa8bd7c6c07c2013b0220543894","user":{"login":"zrgaines","id":11656952,"avatar_url":"https://avatars.githubusercontent.com/u/11656952?v=3","gravatar_id":"","url":"https://api.github.com/users/zrgaines","html_url":"https://github.com/zrgaines","followers_url":"https://api.github.com/users/zrgaines/followers","following_url":"https://api.github.com/users/zrgaines/following{/other_user}","gists_url":"https://api.github.com/users/zrgaines/gists{/gist_id}","starred_url":"https://api.github.com/users/zrgaines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zrgaines/subscriptions","organizations_url":"https://api.github.com/users/zrgaines/orgs","repos_url":"https://api.github.com/users/zrgaines/repos","events_url":"https://api.github.com/users/zrgaines/events{/privacy}","received_events_url":"https://api.github.com/users/zrgaines/received_events","type":"User","site_admin":false},"repo":{"id":61254113,"name":"music_artist_oop_relationships","full_name":"zrgaines/music_artist_oop_relationships","owner":{"login":"zrgaines","id":11656952,"avatar_url":"https://avatars.githubusercontent.com/u/11656952?v=3","gravatar_id":"","url":"https://api.github.com/users/zrgaines","html_url":"https://github.com/zrgaines","followers_url":"https://api.github.com/users/zrgaines/followers","following_url":"https://api.github.com/users/zrgaines/following{/other_user}","gists_url":"https://api.github.com/users/zrgaines/gists{/gist_id}","starred_url":"https://api.github.com/users/zrgaines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zrgaines/subscriptions","organizations_url":"https://api.github.com/users/zrgaines/orgs","repos_url":"https://api.github.com/users/zrgaines/repos","events_url":"https://api.github.com/users/zrgaines/events{/privacy}","received_events_url":"https://api.github.com/users/zrgaines/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zrgaines/music_artist_oop_relationships","description":"","fork":true,"url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships","forks_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/forks","keys_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/teams","hooks_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/hooks","issue_events_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/issues/events{/number}","events_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/events","assignees_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/assignees{/user}","branches_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/branches{/branch}","tags_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/tags","blobs_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/git/refs{/sha}","trees_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/statuses/{sha}","languages_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/languages","stargazers_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/stargazers","contributors_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/contributors","subscribers_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/subscribers","subscription_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/subscription","commits_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/commits{/sha}","git_commits_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/git/commits{/sha}","comments_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/comments{/number}","issue_comment_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/issues/comments{/number}","contents_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/contents/{+path}","compare_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/merges","archive_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/downloads","issues_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/issues{/number}","pulls_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/pulls{/number}","milestones_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/milestones{/number}","notifications_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/labels{/name}","releases_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/releases{/id}","deployments_url":"https://api.github.com/repos/zrgaines/music_artist_oop_relationships/deployments","created_at":"2016-06-16T01:58:49Z","updated_at":"2016-06-16T01:58:51Z","pushed_at":"2016-06-16T02:37:37Z","git_url":"git://github.com/zrgaines/music_artist_oop_relationships.git","ssh_url":"git@github.com:zrgaines/music_artist_oop_relationships.git","clone_url":"https://github.com/zrgaines/music_artist_oop_relationships.git","svn_url":"https://github.com/zrgaines/music_artist_oop_relationships","homepage":null,"size":2,"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":"generalassembly-atx:master","ref":"master","sha":"35ad7f1a06d1156b5012cc6aa7700d12962c832b","user":{"login":"generalassembly-atx","id":11883458,"avatar_url":"https://avatars.githubusercontent.com/u/11883458?v=3","gravatar_id":"","url":"https://api.github.com/users/generalassembly-atx","html_url":"https://github.com/generalassembly-atx","followers_url":"https://api.github.com/users/generalassembly-atx/followers","following_url":"https://api.github.com/users/generalassembly-atx/following{/other_user}","gists_url":"https://api.github.com/users/generalassembly-atx/gists{/gist_id}","starred_url":"https://api.github.com/users/generalassembly-atx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/generalassembly-atx/subscriptions","organizations_url":"https://api.github.com/users/generalassembly-atx/orgs","repos_url":"https://api.github.com/users/generalassembly-atx/repos","events_url":"https://api.github.com/users/generalassembly-atx/events{/privacy}","received_events_url":"https://api.github.com/users/generalassembly-atx/received_events","type":"Organization","site_admin":false},"repo":{"id":61242103,"name":"music_artist_oop_relationships","full_name":"generalassembly-atx/music_artist_oop_relationships","owner":{"login":"generalassembly-atx","id":11883458,"avatar_url":"https://avatars.githubusercontent.com/u/11883458?v=3","gravatar_id":"","url":"https://api.github.com/users/generalassembly-atx","html_url":"https://github.com/generalassembly-atx","followers_url":"https://api.github.com/users/generalassembly-atx/followers","following_url":"https://api.github.com/users/generalassembly-atx/following{/other_user}","gists_url":"https://api.github.com/users/generalassembly-atx/gists{/gist_id}","starred_url":"https://api.github.com/users/generalassembly-atx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/generalassembly-atx/subscriptions","organizations_url":"https://api.github.com/users/generalassembly-atx/orgs","repos_url":"https://api.github.com/users/generalassembly-atx/repos","events_url":"https://api.github.com/users/generalassembly-atx/events{/privacy}","received_events_url":"https://api.github.com/users/generalassembly-atx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/generalassembly-atx/music_artist_oop_relationships","description":"","fork":false,"url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships","forks_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/forks","keys_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/keys{/key_id}","collaborators_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/teams","hooks_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/hooks","issue_events_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/issues/events{/number}","events_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/events","assignees_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/assignees{/user}","branches_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/branches{/branch}","tags_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/tags","blobs_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/git/refs{/sha}","trees_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/git/trees{/sha}","statuses_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/statuses/{sha}","languages_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/languages","stargazers_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/stargazers","contributors_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/contributors","subscribers_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/subscribers","subscription_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/subscription","commits_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/commits{/sha}","git_commits_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/git/commits{/sha}","comments_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/comments{/number}","issue_comment_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/issues/comments{/number}","contents_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/contents/{+path}","compare_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/compare/{base}...{head}","merges_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/merges","archive_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/downloads","issues_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/issues{/number}","pulls_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls{/number}","milestones_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/milestones{/number}","notifications_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/labels{/name}","releases_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/releases{/id}","deployments_url":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/deployments","created_at":"2016-06-15T21:27:29Z","updated_at":"2016-06-15T22:15:23Z","pushed_at":"2016-06-16T17:47:16Z","git_url":"git://github.com/generalassembly-atx/music_artist_oop_relationships.git","ssh_url":"git@github.com:generalassembly-atx/music_artist_oop_relationships.git","clone_url":"https://github.com/generalassembly-atx/music_artist_oop_relationships.git","svn_url":"https://github.com/generalassembly-atx/music_artist_oop_relationships","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":8,"forks":10,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5"},"html":{"href":"https://github.com/generalassembly-atx/music_artist_oop_relationships/pull/5"},"issue":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/issues/5"},"comments":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/generalassembly-atx/music_artist_oop_relationships/statuses/eef432d7cb583aa8bd7c6c07c2013b0220543894"}}}}
{"actor":{"display_login":"seans887"}}