{"action":"created","comment":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/38806270","id":38806270,"diff_hunk":"@@ -1,70 +1,101 @@\n-  /*\n-  Crie dois objetos, que serão duas pessoas. Cada um deve ter as propriedades\n-  `name` e `lastName`, preenchidos com o nome e sobrenome da pessoa.\n-  */\n-  // ?\n \n-  /*\n-  Agora crie uma função chamada `getFullName` que retorne as propriedades\n-  `name` e `lastName` dos objetos acima, formando um nome completo.\n-  A função não deve receber nenhum parâmetro, mas as propriedades `name` e\n-  `lastName` devem ser dinâmicas.\n-  A mesma função deve servir para as duas pessoas (ou qualquer outra que for\n-  criada).\n-  Depois disso, invoque essa função, mostrando no console o nome completo das\n-  pessoas que foram criadas anteriormente, passando as pessoas acima como\n-  contexto da função. Use um console.log por pessoa.\n-  */\n-  console.log( 'O nome das pessoas é:' );\n-  // ?\n+      ( function( win, doc ) {\n+        'use strict';\n+        /*\n+        Crie dois objetos, que serão duas pessoas. Cada um deve ter as propriedades\n+        `name` e `lastName`, preenchidos com o nome e sobrenome da pessoa.\n+        */\n+        var personOne = {\n+          name: 'Rodrigo',\n+          lastName: 'Mendez'\n+        };\n+        var personTwo = {\n+          name: 'Thiago',\n+          lastName: 'Custódio'\n+        };\n \n-  /*\n-  Crie uma função chamada `sum`. Essa função pode receber uma lista de\n-  parâmetros variável, e deverá retornar a soma de todos eles.\n-  Não use estruturas de repetição para somar os argumentos.\n-  Na primeira linha, dentro da função, deixe um console.log para mostrar todos\n-  os parâmetros passados para essa função.\n-  */\n-  // ?\n+        /*\n+        Agora crie uma função chamada `getFullName` que retorne as propriedades\n+        `name` e `lastName` dos objetos acima, formando um nome completo.\n+        A função não deve receber nenhum parâmetro, mas as propriedades `name` e\n+        `lastName` devem ser dinâmicas.\n+        A mesma função deve servir para as duas pessoas (ou qualquer outra que for\n+        criada).\n+        Depois disso, invoque essa função, mostrando no console o nome completo das\n+        pessoas que foram criadas anteriormente, passando as pessoas acima como\n+        contexto da função. Use um console.log por pessoa.\n+        */\n+        console.log( 'O nome das pessoas é:' );\n+        function getFullName() {\n+          return this.name + ' ' + this.lastName;\n+        }\n+        console.log( getFullName.call( personOne ) );\n+        console.log( getFullName.call( personTwo ) );\n \n-  /*\n-  Mostre no console que a função acima funciona, invocando-a em 3 console.log\n-  diferentes, com quantidades variáveis de parâmetros passados.\n-  */\n-  console.log( '\\nSomar alguns números:' );\n-  // ?\n \n-  /*\n-  Declare uma variável chamada `userEntry`, que irá receber alguns valores\n-  entrados pelo usuário. Mostre para o usuário a seguinte frase:\n-  \"Entre com alguns números que serão somados:\"\n-  */\n-  // ?\n \n-  /*\n-  Mostre no console o valor entrado pelo usuário:\n-  */\n-  console.log( '\\nEntrada do usuário:' );\n-  // ?\n \n-  /*\n-  Crie uma função chamada `justNumbers`, que recebe por parâmetro uma string\n-  e remove tudo o que não for número, retornando um array somente com os números\n-  da string. Mostre a representação em string dessa função no console.\n-  */\n-  console.log( '\\nFunção que limpa entrada do usuário (somente números):' );\n-  // ?\n+        /*\n+        Crie uma função chamada `sum`. Essa função pode receber uma lista de\n+        parâmetros variável, e deverá retornar a soma de todos eles.\n+        Não use estruturas de repetição para somar os argumentos.\n+        Na primeira linha, dentro da função, deixe um console.log para mostrar todos\n+        os parâmetros passados para essa função.\n+        */\n+        function sum() {\n+            console.log( arguments )\n+            var result = Array.prototype.reduce.call( arguments, function( acumulated, actual ) {\n+                return acumulated + actual;\n+            });\n+            console.log( result )","path":"challenge-22/challenge-22.js","position":100,"original_position":100,"commit_id":"8c87b26c54f2602ef23ebd094659cbefd7463e07","original_commit_id":"8c87b26c54f2602ef23ebd094659cbefd7463e07","user":{"login":"fdaciuk","id":487669,"avatar_url":"https://avatars.githubusercontent.com/u/487669?v=3","gravatar_id":"","url":"https://api.github.com/users/fdaciuk","html_url":"https://github.com/fdaciuk","followers_url":"https://api.github.com/users/fdaciuk/followers","following_url":"https://api.github.com/users/fdaciuk/following{/other_user}","gists_url":"https://api.github.com/users/fdaciuk/gists{/gist_id}","starred_url":"https://api.github.com/users/fdaciuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdaciuk/subscriptions","organizations_url":"https://api.github.com/users/fdaciuk/orgs","repos_url":"https://api.github.com/users/fdaciuk/repos","events_url":"https://api.github.com/users/fdaciuk/events{/privacy}","received_events_url":"https://api.github.com/users/fdaciuk/received_events","type":"User","site_admin":false},"body":"-1\r\n`;`","created_at":"2015-09-05T02:23:57Z","updated_at":"2015-09-05T02:23:57Z","html_url":"https://github.com/da2k/curso-javascript-ninja/pull/292#discussion_r38806270","pull_request_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292","_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/38806270"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/292#discussion_r38806270"},"pull_request":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292"}}},"pull_request":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292","id":43561830,"html_url":"https://github.com/da2k/curso-javascript-ninja/pull/292","diff_url":"https://github.com/da2k/curso-javascript-ninja/pull/292.diff","patch_url":"https://github.com/da2k/curso-javascript-ninja/pull/292.patch","issue_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/292","number":292,"state":"open","locked":false,"title":"Challenge 22","user":{"login":"silvioCoelho","id":6528661,"avatar_url":"https://avatars.githubusercontent.com/u/6528661?v=3","gravatar_id":"","url":"https://api.github.com/users/silvioCoelho","html_url":"https://github.com/silvioCoelho","followers_url":"https://api.github.com/users/silvioCoelho/followers","following_url":"https://api.github.com/users/silvioCoelho/following{/other_user}","gists_url":"https://api.github.com/users/silvioCoelho/gists{/gist_id}","starred_url":"https://api.github.com/users/silvioCoelho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silvioCoelho/subscriptions","organizations_url":"https://api.github.com/users/silvioCoelho/orgs","repos_url":"https://api.github.com/users/silvioCoelho/repos","events_url":"https://api.github.com/users/silvioCoelho/events{/privacy}","received_events_url":"https://api.github.com/users/silvioCoelho/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-27T20:18:55Z","updated_at":"2015-09-05T02:23:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d030c4d6a7b129e3742e44962c638223b28e275f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292/commits","review_comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292/comments","review_comment_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments{/number}","comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/292/comments","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/8c87b26c54f2602ef23ebd094659cbefd7463e07","head":{"label":"silvioCoelho:challenge-22","ref":"challenge-22","sha":"8c87b26c54f2602ef23ebd094659cbefd7463e07","user":{"login":"silvioCoelho","id":6528661,"avatar_url":"https://avatars.githubusercontent.com/u/6528661?v=3","gravatar_id":"","url":"https://api.github.com/users/silvioCoelho","html_url":"https://github.com/silvioCoelho","followers_url":"https://api.github.com/users/silvioCoelho/followers","following_url":"https://api.github.com/users/silvioCoelho/following{/other_user}","gists_url":"https://api.github.com/users/silvioCoelho/gists{/gist_id}","starred_url":"https://api.github.com/users/silvioCoelho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silvioCoelho/subscriptions","organizations_url":"https://api.github.com/users/silvioCoelho/orgs","repos_url":"https://api.github.com/users/silvioCoelho/repos","events_url":"https://api.github.com/users/silvioCoelho/events{/privacy}","received_events_url":"https://api.github.com/users/silvioCoelho/received_events","type":"User","site_admin":false},"repo":{"id":33288894,"name":"curso-javascript-ninja","full_name":"silvioCoelho/curso-javascript-ninja","owner":{"login":"silvioCoelho","id":6528661,"avatar_url":"https://avatars.githubusercontent.com/u/6528661?v=3","gravatar_id":"","url":"https://api.github.com/users/silvioCoelho","html_url":"https://github.com/silvioCoelho","followers_url":"https://api.github.com/users/silvioCoelho/followers","following_url":"https://api.github.com/users/silvioCoelho/following{/other_user}","gists_url":"https://api.github.com/users/silvioCoelho/gists{/gist_id}","starred_url":"https://api.github.com/users/silvioCoelho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silvioCoelho/subscriptions","organizations_url":"https://api.github.com/users/silvioCoelho/orgs","repos_url":"https://api.github.com/users/silvioCoelho/repos","events_url":"https://api.github.com/users/silvioCoelho/events{/privacy}","received_events_url":"https://api.github.com/users/silvioCoelho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/silvioCoelho/curso-javascript-ninja","description":"Curso Javascript Ninja","fork":true,"url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja","forks_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/forks","keys_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/teams","hooks_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/hooks","issue_events_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/events","assignees_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/tags","blobs_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/languages","stargazers_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/stargazers","contributors_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/contributors","subscribers_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/subscribers","subscription_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/subscription","commits_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/merges","archive_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/downloads","issues_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/labels{/name}","releases_url":"https://api.github.com/repos/silvioCoelho/curso-javascript-ninja/releases{/id}","created_at":"2015-04-02T04:19:11Z","updated_at":"2015-05-04T14:57:03Z","pushed_at":"2015-08-27T20:18:14Z","git_url":"git://github.com/silvioCoelho/curso-javascript-ninja.git","ssh_url":"git@github.com:silvioCoelho/curso-javascript-ninja.git","clone_url":"https://github.com/silvioCoelho/curso-javascript-ninja.git","svn_url":"https://github.com/silvioCoelho/curso-javascript-ninja","homepage":"http://blog.da2k.com.br/curso-javascript-ninja/","size":364,"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":"da2k:master","ref":"master","sha":"4746b4a908cdd533660470553333570911c824d1","user":{"login":"da2k","id":11011075,"avatar_url":"https://avatars.githubusercontent.com/u/11011075?v=3","gravatar_id":"","url":"https://api.github.com/users/da2k","html_url":"https://github.com/da2k","followers_url":"https://api.github.com/users/da2k/followers","following_url":"https://api.github.com/users/da2k/following{/other_user}","gists_url":"https://api.github.com/users/da2k/gists{/gist_id}","starred_url":"https://api.github.com/users/da2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da2k/subscriptions","organizations_url":"https://api.github.com/users/da2k/orgs","repos_url":"https://api.github.com/users/da2k/repos","events_url":"https://api.github.com/users/da2k/events{/privacy}","received_events_url":"https://api.github.com/users/da2k/received_events","type":"Organization","site_admin":false},"repo":{"id":30896610,"name":"curso-javascript-ninja","full_name":"da2k/curso-javascript-ninja","owner":{"login":"da2k","id":11011075,"avatar_url":"https://avatars.githubusercontent.com/u/11011075?v=3","gravatar_id":"","url":"https://api.github.com/users/da2k","html_url":"https://github.com/da2k","followers_url":"https://api.github.com/users/da2k/followers","following_url":"https://api.github.com/users/da2k/following{/other_user}","gists_url":"https://api.github.com/users/da2k/gists{/gist_id}","starred_url":"https://api.github.com/users/da2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da2k/subscriptions","organizations_url":"https://api.github.com/users/da2k/orgs","repos_url":"https://api.github.com/users/da2k/repos","events_url":"https://api.github.com/users/da2k/events{/privacy}","received_events_url":"https://api.github.com/users/da2k/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/da2k/curso-javascript-ninja","description":"Curso Javascript Ninja","fork":false,"url":"https://api.github.com/repos/da2k/curso-javascript-ninja","forks_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/forks","keys_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/teams","hooks_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/hooks","issue_events_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/events","assignees_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/tags","blobs_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/languages","stargazers_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/stargazers","contributors_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/contributors","subscribers_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/subscribers","subscription_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/subscription","commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/merges","archive_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/downloads","issues_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/labels{/name}","releases_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/releases{/id}","created_at":"2015-02-17T00:57:58Z","updated_at":"2015-08-28T02:25:52Z","pushed_at":"2015-09-04T23:52:45Z","git_url":"git://github.com/da2k/curso-javascript-ninja.git","ssh_url":"git@github.com:da2k/curso-javascript-ninja.git","clone_url":"https://github.com/da2k/curso-javascript-ninja.git","svn_url":"https://github.com/da2k/curso-javascript-ninja","homepage":"http://blog.da2k.com.br/curso-javascript-ninja/","size":2717,"stargazers_count":36,"watchers_count":36,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":50,"forks":42,"open_issues":50,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/292"},"issue":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/292"},"comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/292/comments"},"review_comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292/comments"},"review_comment":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/292/commits"},"statuses":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/8c87b26c54f2602ef23ebd094659cbefd7463e07"}}}}