{"action":"created","comment":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/27894041","id":27894041,"diff_hunk":"@@ -58,8 +73,27 @@ Crie uma função com as seguintes características:\n 5. Se nenhum argumento for passado, retorne o valor booleano `false`.\n 6. E ainda, se nenhuma das condições acima forem atendidas, retorne `null`.\n */\n-?\n+function outraQualquer(x, y, z){\n+\tif(x != null){\n+\t\tif(y != null && z == null){\n+\t\t\treturn x + y;\n+\t\t}else if(z != null){\n+\t\t\treturn (x + y) / z;\n+\t\t}\n+\t\treturn x;\n+\t}else {\n+\t\treturn false;\n+\t}\n+\treturn null;\n+}","path":"challenge-02/README.md","position":94,"original_position":94,"commit_id":"96ff3a621c289daa45c6ecefe919d9b7ae1a1497","original_commit_id":"96ff3a621c289daa45c6ecefe919d9b7ae1a1497","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\nAqui é o mesmo esquema da função anterior: é necessário usar o `undefined` para verificar se o valor não foi mesmo passado.. no caso, eu poderia passar `null` como algum argumento, o que faria quebrar essa lógica :)\r\n\r\nOutra dica: sempre que for fazer comparação, utilize o operador estrito: `===` :)","created_at":"2015-04-07T16:22:23Z","updated_at":"2015-04-07T16:22:23Z","html_url":"https://github.com/da2k/curso-javascript-ninja/pull/20#discussion_r27894041","pull_request_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/27894041"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/20#discussion_r27894041"},"pull_request":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/20","id":32724619,"html_url":"https://github.com/da2k/curso-javascript-ninja/pull/20","diff_url":"https://github.com/da2k/curso-javascript-ninja/pull/20.diff","patch_url":"https://github.com/da2k/curso-javascript-ninja/pull/20.patch","issue_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/20","number":20,"state":"open","locked":false,"title":"Challenge 02","user":{"login":"mauriciojunior","id":11360995,"avatar_url":"https://avatars.githubusercontent.com/u/11360995?v=3","gravatar_id":"","url":"https://api.github.com/users/mauriciojunior","html_url":"https://github.com/mauriciojunior","followers_url":"https://api.github.com/users/mauriciojunior/followers","following_url":"https://api.github.com/users/mauriciojunior/following{/other_user}","gists_url":"https://api.github.com/users/mauriciojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/mauriciojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauriciojunior/subscriptions","organizations_url":"https://api.github.com/users/mauriciojunior/orgs","repos_url":"https://api.github.com/users/mauriciojunior/repos","events_url":"https://api.github.com/users/mauriciojunior/events{/privacy}","received_events_url":"https://api.github.com/users/mauriciojunior/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-07T00:40:35Z","updated_at":"2015-04-07T16:22:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d024a00dd6becf904eaee17228fcd36f7a9bd9b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/20/commits","review_comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/20/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/20/comments","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/96ff3a621c289daa45c6ecefe919d9b7ae1a1497","head":{"label":"mauriciojunior:challenge-02","ref":"challenge-02","sha":"96ff3a621c289daa45c6ecefe919d9b7ae1a1497","user":{"login":"mauriciojunior","id":11360995,"avatar_url":"https://avatars.githubusercontent.com/u/11360995?v=3","gravatar_id":"","url":"https://api.github.com/users/mauriciojunior","html_url":"https://github.com/mauriciojunior","followers_url":"https://api.github.com/users/mauriciojunior/followers","following_url":"https://api.github.com/users/mauriciojunior/following{/other_user}","gists_url":"https://api.github.com/users/mauriciojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/mauriciojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauriciojunior/subscriptions","organizations_url":"https://api.github.com/users/mauriciojunior/orgs","repos_url":"https://api.github.com/users/mauriciojunior/repos","events_url":"https://api.github.com/users/mauriciojunior/events{/privacy}","received_events_url":"https://api.github.com/users/mauriciojunior/received_events","type":"User","site_admin":false},"repo":{"id":33150282,"name":"curso-javascript-ninja","full_name":"mauriciojunior/curso-javascript-ninja","owner":{"login":"mauriciojunior","id":11360995,"avatar_url":"https://avatars.githubusercontent.com/u/11360995?v=3","gravatar_id":"","url":"https://api.github.com/users/mauriciojunior","html_url":"https://github.com/mauriciojunior","followers_url":"https://api.github.com/users/mauriciojunior/followers","following_url":"https://api.github.com/users/mauriciojunior/following{/other_user}","gists_url":"https://api.github.com/users/mauriciojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/mauriciojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauriciojunior/subscriptions","organizations_url":"https://api.github.com/users/mauriciojunior/orgs","repos_url":"https://api.github.com/users/mauriciojunior/repos","events_url":"https://api.github.com/users/mauriciojunior/events{/privacy}","received_events_url":"https://api.github.com/users/mauriciojunior/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mauriciojunior/curso-javascript-ninja","description":"Curso Javascript Ninja","fork":true,"url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja","forks_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/forks","keys_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/teams","hooks_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/hooks","issue_events_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/events","assignees_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/tags","blobs_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/languages","stargazers_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/stargazers","contributors_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/contributors","subscribers_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/subscribers","subscription_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/subscription","commits_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/merges","archive_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/downloads","issues_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/labels{/name}","releases_url":"https://api.github.com/repos/mauriciojunior/curso-javascript-ninja/releases{/id}","created_at":"2015-03-30T21:51:40Z","updated_at":"2015-03-30T14:36:10Z","pushed_at":"2015-04-07T00:39:31Z","git_url":"git://github.com/mauriciojunior/curso-javascript-ninja.git","ssh_url":"git@github.com:mauriciojunior/curso-javascript-ninja.git","clone_url":"https://github.com/mauriciojunior/curso-javascript-ninja.git","svn_url":"https://github.com/mauriciojunior/curso-javascript-ninja","homepage":"http://blog.da2k.com.br/curso-javascript-ninja/","size":90,"stargazers_count":0,"watchers_count":0,"language":null,"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":"7b060e5d62f19919277ed39aa1b56be9d0dce558","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-04-06T19:24:11Z","pushed_at":"2015-04-07T14:36:42Z","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":734,"stargazers_count":18,"watchers_count":18,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":18,"forks":18,"open_issues":18,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/20"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/20"},"issue":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/20"},"comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/20/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/20/commits"},"statuses":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/96ff3a621c289daa45c6ecefe919d9b7ae1a1497"}}}}