{"action":"created","comment":{"url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/comments/83539921","pull_request_review_id":4379340,"id":83539921,"diff_hunk":"@@ -1,48 +1,21 @@\n-var ele = document.getElementById('contenido');\n \n-function cuentaCombinaciones(){\n+\n+function cuentaCombinaciones() {\n+    \n     var dado = [1,2,3,4,5,6];\n     var contador = [['2: ', 0], ['3: ', 0], ['4: ', 0], ['5: ', 0], ['6: ', 0], ['7: ', 0], ['8: ', 0], ['9: ', 0], ['10: ', 0], ['11: ', 0], ['12: ', 0]];\n+    \n     for(i=0;i<36000;i++){\n         var tiro1 = dado[Math.floor(Math.random() * dado.length)];\n         var tiro2 = dado[Math.floor(Math.random() * dado.length)];\n-        switch (tiro1 + tiro2){\n-            case 2:\n-                contador[0][1]++;\n-                break;\n-            case 3:\n-                contador[1][1]++;\n-                break;\n-            case 4:\n-                contador[2][1]++;\n-                break;\n-            case 5:\n-                contador[3][1]++;\n-                break;\n-            case 6:\n-                contador[4][1]++;\n-                break;\n-            case 7:\n-                contador[5][1]++;\n-                break;\n-            case 8:\n-                contador[6][1]++;\n-                break;\n-            case 9:\n-                contador[7][1]++;\n-                break;\n-            case 10:\n-                contador[8][1]++;\n-                break;\n-            case 11:\n-                contador[9][1]++;\n-                break;\n-            case 12:\n-                contador[10][1]++;\n-                break;\n-        }\n+\n+        contador[(tiro1 + tiro2)-2][1]++;\n     }\n     return contador;\n }\n \n-ele.innerHTML = cuentaCombinaciones();\n\\ No newline at end of file\n+\n+window.onload = function() {","path":"ej9rel2.js","position":57,"original_position":57,"commit_id":"dec49a8679ca58b328adb34da012102806b33672","original_commit_id":"dec49a8679ca58b328adb34da012102806b33672","user":{"login":"pmrt","id":22831717,"avatar_url":"https://avatars.githubusercontent.com/u/22831717?v=3","gravatar_id":"","url":"https://api.github.com/users/pmrt","html_url":"https://github.com/pmrt","followers_url":"https://api.github.com/users/pmrt/followers","following_url":"https://api.github.com/users/pmrt/following{/other_user}","gists_url":"https://api.github.com/users/pmrt/gists{/gist_id}","starred_url":"https://api.github.com/users/pmrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmrt/subscriptions","organizations_url":"https://api.github.com/users/pmrt/orgs","repos_url":"https://api.github.com/users/pmrt/repos","events_url":"https://api.github.com/users/pmrt/events{/privacy}","received_events_url":"https://api.github.com/users/pmrt/received_events","type":"User","site_admin":false},"body":"Siempre utilizar window.onload !","created_at":"2016-10-15T20:44:37Z","updated_at":"2016-10-15T20:44:37Z","html_url":"https://github.com/JosePFerre/Relacion2Tema3/pull/1#discussion_r83539921","pull_request_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/comments/83539921"},"html":{"href":"https://github.com/JosePFerre/Relacion2Tema3/pull/1#discussion_r83539921"},"pull_request":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1","id":89505936,"html_url":"https://github.com/JosePFerre/Relacion2Tema3/pull/1","diff_url":"https://github.com/JosePFerre/Relacion2Tema3/pull/1.diff","patch_url":"https://github.com/JosePFerre/Relacion2Tema3/pull/1.patch","issue_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/issues/1","number":1,"state":"open","locked":false,"title":"some code improvements","user":{"login":"pmrt","id":22831717,"avatar_url":"https://avatars.githubusercontent.com/u/22831717?v=3","gravatar_id":"","url":"https://api.github.com/users/pmrt","html_url":"https://github.com/pmrt","followers_url":"https://api.github.com/users/pmrt/followers","following_url":"https://api.github.com/users/pmrt/following{/other_user}","gists_url":"https://api.github.com/users/pmrt/gists{/gist_id}","starred_url":"https://api.github.com/users/pmrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmrt/subscriptions","organizations_url":"https://api.github.com/users/pmrt/orgs","repos_url":"https://api.github.com/users/pmrt/repos","events_url":"https://api.github.com/users/pmrt/events{/privacy}","received_events_url":"https://api.github.com/users/pmrt/received_events","type":"User","site_admin":false},"body":"@JosePFerre Pequeña mejora del código. Si quieres tenerla en tu ordenador después de aceptar la pull request, con tu consola vete al directorio de tu Relacion2Tema3 y haz: git pull origin master\r\n","created_at":"2016-10-15T20:42:21Z","updated_at":"2016-10-15T20:44:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eda4aaaea1b2db9a7f270d0c0f69b1c7c9a93210","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1/commits","review_comments_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1/comments","review_comment_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/issues/1/comments","statuses_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/statuses/dec49a8679ca58b328adb34da012102806b33672","head":{"label":"pmrt:codeimprovement","ref":"codeimprovement","sha":"dec49a8679ca58b328adb34da012102806b33672","user":{"login":"pmrt","id":22831717,"avatar_url":"https://avatars.githubusercontent.com/u/22831717?v=3","gravatar_id":"","url":"https://api.github.com/users/pmrt","html_url":"https://github.com/pmrt","followers_url":"https://api.github.com/users/pmrt/followers","following_url":"https://api.github.com/users/pmrt/following{/other_user}","gists_url":"https://api.github.com/users/pmrt/gists{/gist_id}","starred_url":"https://api.github.com/users/pmrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmrt/subscriptions","organizations_url":"https://api.github.com/users/pmrt/orgs","repos_url":"https://api.github.com/users/pmrt/repos","events_url":"https://api.github.com/users/pmrt/events{/privacy}","received_events_url":"https://api.github.com/users/pmrt/received_events","type":"User","site_admin":false},"repo":{"id":71010782,"name":"Relacion2Tema3","full_name":"pmrt/Relacion2Tema3","owner":{"login":"pmrt","id":22831717,"avatar_url":"https://avatars.githubusercontent.com/u/22831717?v=3","gravatar_id":"","url":"https://api.github.com/users/pmrt","html_url":"https://github.com/pmrt","followers_url":"https://api.github.com/users/pmrt/followers","following_url":"https://api.github.com/users/pmrt/following{/other_user}","gists_url":"https://api.github.com/users/pmrt/gists{/gist_id}","starred_url":"https://api.github.com/users/pmrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmrt/subscriptions","organizations_url":"https://api.github.com/users/pmrt/orgs","repos_url":"https://api.github.com/users/pmrt/repos","events_url":"https://api.github.com/users/pmrt/events{/privacy}","received_events_url":"https://api.github.com/users/pmrt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pmrt/Relacion2Tema3","description":null,"fork":true,"url":"https://api.github.com/repos/pmrt/Relacion2Tema3","forks_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/forks","keys_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/teams","hooks_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/hooks","issue_events_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/issues/events{/number}","events_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/events","assignees_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/assignees{/user}","branches_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/branches{/branch}","tags_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/tags","blobs_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/git/refs{/sha}","trees_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/statuses/{sha}","languages_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/languages","stargazers_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/stargazers","contributors_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/contributors","subscribers_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/subscribers","subscription_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/subscription","commits_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/commits{/sha}","git_commits_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/git/commits{/sha}","comments_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/comments{/number}","issue_comment_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/issues/comments{/number}","contents_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/contents/{+path}","compare_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/merges","archive_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/downloads","issues_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/issues{/number}","pulls_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/pulls{/number}","milestones_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/milestones{/number}","notifications_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/labels{/name}","releases_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/releases{/id}","deployments_url":"https://api.github.com/repos/pmrt/Relacion2Tema3/deployments","created_at":"2016-10-15T20:11:12Z","updated_at":"2016-10-15T20:11:13Z","pushed_at":"2016-10-15T20:38:28Z","git_url":"git://github.com/pmrt/Relacion2Tema3.git","ssh_url":"git@github.com:pmrt/Relacion2Tema3.git","clone_url":"https://github.com/pmrt/Relacion2Tema3.git","svn_url":"https://github.com/pmrt/Relacion2Tema3","homepage":null,"size":1,"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":"JosePFerre:master","ref":"master","sha":"3c270f5770aae68b1f02d10de1510bb16fbc1296","user":{"login":"JosePFerre","id":22831861,"avatar_url":"https://avatars.githubusercontent.com/u/22831861?v=3","gravatar_id":"","url":"https://api.github.com/users/JosePFerre","html_url":"https://github.com/JosePFerre","followers_url":"https://api.github.com/users/JosePFerre/followers","following_url":"https://api.github.com/users/JosePFerre/following{/other_user}","gists_url":"https://api.github.com/users/JosePFerre/gists{/gist_id}","starred_url":"https://api.github.com/users/JosePFerre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosePFerre/subscriptions","organizations_url":"https://api.github.com/users/JosePFerre/orgs","repos_url":"https://api.github.com/users/JosePFerre/repos","events_url":"https://api.github.com/users/JosePFerre/events{/privacy}","received_events_url":"https://api.github.com/users/JosePFerre/received_events","type":"User","site_admin":false},"repo":{"id":70884767,"name":"Relacion2Tema3","full_name":"JosePFerre/Relacion2Tema3","owner":{"login":"JosePFerre","id":22831861,"avatar_url":"https://avatars.githubusercontent.com/u/22831861?v=3","gravatar_id":"","url":"https://api.github.com/users/JosePFerre","html_url":"https://github.com/JosePFerre","followers_url":"https://api.github.com/users/JosePFerre/followers","following_url":"https://api.github.com/users/JosePFerre/following{/other_user}","gists_url":"https://api.github.com/users/JosePFerre/gists{/gist_id}","starred_url":"https://api.github.com/users/JosePFerre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosePFerre/subscriptions","organizations_url":"https://api.github.com/users/JosePFerre/orgs","repos_url":"https://api.github.com/users/JosePFerre/repos","events_url":"https://api.github.com/users/JosePFerre/events{/privacy}","received_events_url":"https://api.github.com/users/JosePFerre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JosePFerre/Relacion2Tema3","description":null,"fork":false,"url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3","forks_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/forks","keys_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/teams","hooks_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/hooks","issue_events_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/issues/events{/number}","events_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/events","assignees_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/assignees{/user}","branches_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/branches{/branch}","tags_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/tags","blobs_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/git/refs{/sha}","trees_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/statuses/{sha}","languages_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/languages","stargazers_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/stargazers","contributors_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/contributors","subscribers_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/subscribers","subscription_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/subscription","commits_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/commits{/sha}","git_commits_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/git/commits{/sha}","comments_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/comments{/number}","issue_comment_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/issues/comments{/number}","contents_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/contents/{+path}","compare_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/merges","archive_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/downloads","issues_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/issues{/number}","pulls_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls{/number}","milestones_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/milestones{/number}","notifications_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/labels{/name}","releases_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/releases{/id}","deployments_url":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/deployments","created_at":"2016-10-14T07:22:30Z","updated_at":"2016-10-14T18:07:18Z","pushed_at":"2016-10-15T20:42:21Z","git_url":"git://github.com/JosePFerre/Relacion2Tema3.git","ssh_url":"git@github.com:JosePFerre/Relacion2Tema3.git","clone_url":"https://github.com/JosePFerre/Relacion2Tema3.git","svn_url":"https://github.com/JosePFerre/Relacion2Tema3","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":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1"},"html":{"href":"https://github.com/JosePFerre/Relacion2Tema3/pull/1"},"issue":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/issues/1"},"comments":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/JosePFerre/Relacion2Tema3/statuses/dec49a8679ca58b328adb34da012102806b33672"}}}}
{"actor":{"display_login":"pmrt"}}