{"action":"created","comment":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/49283341","id":49283341,"diff_hunk":"@@ -1,54 +1,96 @@\n-// Envolva todo o código desse arquivo em uma IIFE (incluindo esse comentário).\n-\n-/*\n-Crie uma variável chamada `once`, que recebe `false` como seu valor.\n-Crie um loop que execute enquanto essa variável for verdadeira. Dentro do\n-loop, mostre no console a mensagem:\n-'Entrou ao menos uma vez!'\n-Qual loop você deve usar para que essa mensagem seja mostrada no console?\n-*/\n-// ?\n-\n-/*\n-Crie um objeto chamado `person`, que receba as seguintes propriedades:\n-- 'name', 'age', 'weight' e 'birthday'. Preencha com os valores corretos\n-para o nome, idade, peso e data de nascimento dessa pessoa.\n-*/\n-// ?\n-\n-/*\n-Use um loop para percorrer o objeto criado acima, mostrando no console\n-a frase:\n-'The [PROPERTY] of person is [VALUE]'\n-Aproveite e crie uma variável `counter` que vai contar quantas propriedades\n-esse objeto tem.\n-Após o loop, mostre a frase:\n-'The person has [COUNTER] properties'\n-*/\n-// ?\n-\n-/*\n-Crie uma função chamada `moreThan`, que vai verificar se a pessoa (objeto\n-criado acima) é mais velha que a idade passada por parâmetro.\n-Se verdadeiro, retornar `true`. Senão, retornar false.\n-Após a função, mostrar a mensagem no console:\n-'The person has more than 25 years old? [TRUE/FALSE]'\n-*/\n-// ?\n-\n-/*\n-Faça um loop de 0 a 20, que adicione cada número como um item de um\n-array chamado `numbers`. Se o contador for maior que 10, saia do loop.\n-Mostre no console os números no array.\n-*/\n-console.log( 'De 0 a 10:' );\n-// ?\n-\n-/*\n-Faça outro loop de 0 a 20, que adicione a um array chamado `numbers` (já\n-criado acima, só precisa ser reiniciado) números de 0 a 20, inclusive\n-esses. Se o número for ímpar, pular para o próximo número.\n-Mostrar no console os números do array.\n-*/\n-console.log( 'Pares de 0 a 20:' );\n-// ?\n+(function(){\n+\t// Envolva todo o código desse arquivo em uma IIFE (incluindo esse comentário).\n+\n+\t/*\n+\tCrie uma variável chamada `once`, que recebe `false` como seu valor.\n+\tCrie um loop que execute enquanto essa variável for verdadeira. Dentro do\n+\tloop, mostre no console a mensagem:\n+\t'Entrou ao menos uma vez!'\n+\tQual loop você deve usar para que essa mensagem seja mostrada no console?\n+\t*/\n+\tvar once = false;\n+\tdo {\n+\t\tconsole.log( 'Entrou ao menos uma vez!' );\n+\t} while ( once );\n+\n+\t/*\n+\tCrie um objeto chamado `person`, que receba as seguintes propriedades:\n+\t- 'name', 'age', 'weight' e 'birthday'. Preencha com os valores corretos\n+\tpara o nome, idade, peso e data de nascimento dessa pessoa.\n+\t*/\n+\tvar person = {\n+\t\tname: 'Allef',\n+\t\tage: 22,\n+\t\tweight: 86,\n+\t\tbirthday: '02/07/1993' \n+\t};\n+\n+\t/*\n+\tUse um loop para percorrer o objeto criado acima, mostrando no console\n+\ta frase:\n+\t'The [PROPERTY] of person is [VALUE]'\n+\tAproveite e crie uma variável `counter` que vai contar quantas propriedades\n+\tesse objeto tem.\n+\tApós o loop, mostre a frase:\n+\t'The person has [COUNTER] properties'\n+\t*/\n+\tvar counter = 0;\n+\tfor ( var prop in person ) {\n+\t\tconsole.log( 'The ' + prop + ' of person is ' + person[prop] + '' );\n+\t\tcounter++;\n+\t}\n+\n+\tconsole.log( 'The person has ' + counter + ' properties' );\n+\n+\t/*\n+\tCrie uma função chamada `moreThan`, que vai verificar se a pessoa (objeto\n+\tcriado acima) é mais velha que a idade passada por parâmetro.\n+\tSe verdadeiro, retornar `true`. Senão, retornar false.\n+\tApós a função, mostrar a mensagem no console:\n+\t'The person has more than 25 years old? [TRUE/FALSE]'\n+\t*/\n+\n+\tfunction moreThan( age ){\t\t\n+\t\treturn person.age > age ? true : false;\n+\t}\n+\n+\tconsole.log('The person has more than 25 years old?', moreThan( 25 ) );\n+\n+\t/*\n+\tFaça um loop de 0 a 20, que adicione cada número como um item de um\n+\tarray chamado `numbers`. Se o contador for maior que 10, saia do loop.\n+\tMostre no console os números no array.\n+\t*/\n+\tconsole.log( 'De 0 a 10:' );\n+\tvar numbers = [];\n+\n+\tfor ( var i = 0; i < 20; i++ ) {\n+\t\t\n+\t\tif ( i > 10 ) {\t\t\t\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tnumbers.push( i );\n+\t}\n+\tconsole.log( numbers );\n+\n+\t/*\n+\tFaça outro loop de 0 a 20, que adicione a um array chamado `numbers` (já\n+\tcriado acima, só precisa ser reiniciado) números de 0 a 20, inclusive\n+\tesses. Se o número for ímpar, pular para o próximo número.\n+\tMostrar no console os números do array.\n+\t*/\n+\tconsole.log( 'Pares de 0 a 20:' );\n+\tnumbers = [];\t\n+\tfor ( var i = 0; i <= 20; i++ ) {\n+","path":"challenge-11/challenge-11.js","position":140,"original_position":140,"commit_id":"f800309cbfe4a7873cef39e889cf78c415c288ec","original_commit_id":"f800309cbfe4a7873cef39e889cf78c415c288ec","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\nEspaço em branco","created_at":"2016-01-10T23:12:13Z","updated_at":"2016-01-10T23:12:13Z","html_url":"https://github.com/da2k/curso-javascript-ninja/pull/505#discussion_r49283341","pull_request_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/505","_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/49283341"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/505#discussion_r49283341"},"pull_request":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/505"}}},"pull_request":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/505","id":52928430,"html_url":"https://github.com/da2k/curso-javascript-ninja/pull/505","diff_url":"https://github.com/da2k/curso-javascript-ninja/pull/505.diff","patch_url":"https://github.com/da2k/curso-javascript-ninja/pull/505.patch","issue_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/505","number":505,"state":"open","locked":false,"title":"Challenge-11","user":{"login":"allefbr","id":2867569,"avatar_url":"https://avatars.githubusercontent.com/u/2867569?v=3","gravatar_id":"","url":"https://api.github.com/users/allefbr","html_url":"https://github.com/allefbr","followers_url":"https://api.github.com/users/allefbr/followers","following_url":"https://api.github.com/users/allefbr/following{/other_user}","gists_url":"https://api.github.com/users/allefbr/gists{/gist_id}","starred_url":"https://api.github.com/users/allefbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allefbr/subscriptions","organizations_url":"https://api.github.com/users/allefbr/orgs","repos_url":"https://api.github.com/users/allefbr/repos","events_url":"https://api.github.com/users/allefbr/events{/privacy}","received_events_url":"https://api.github.com/users/allefbr/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-08T01:52:47Z","updated_at":"2016-01-10T23:12:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05a3dbb497f13d8850422c87d94130d8255423d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/505/commits","review_comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/505/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/505/comments","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/f800309cbfe4a7873cef39e889cf78c415c288ec","head":{"label":"allefbr:challenge-11","ref":"challenge-11","sha":"f800309cbfe4a7873cef39e889cf78c415c288ec","user":{"login":"allefbr","id":2867569,"avatar_url":"https://avatars.githubusercontent.com/u/2867569?v=3","gravatar_id":"","url":"https://api.github.com/users/allefbr","html_url":"https://github.com/allefbr","followers_url":"https://api.github.com/users/allefbr/followers","following_url":"https://api.github.com/users/allefbr/following{/other_user}","gists_url":"https://api.github.com/users/allefbr/gists{/gist_id}","starred_url":"https://api.github.com/users/allefbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allefbr/subscriptions","organizations_url":"https://api.github.com/users/allefbr/orgs","repos_url":"https://api.github.com/users/allefbr/repos","events_url":"https://api.github.com/users/allefbr/events{/privacy}","received_events_url":"https://api.github.com/users/allefbr/received_events","type":"User","site_admin":false},"repo":{"id":45045509,"name":"curso-javascript-ninja","full_name":"allefbr/curso-javascript-ninja","owner":{"login":"allefbr","id":2867569,"avatar_url":"https://avatars.githubusercontent.com/u/2867569?v=3","gravatar_id":"","url":"https://api.github.com/users/allefbr","html_url":"https://github.com/allefbr","followers_url":"https://api.github.com/users/allefbr/followers","following_url":"https://api.github.com/users/allefbr/following{/other_user}","gists_url":"https://api.github.com/users/allefbr/gists{/gist_id}","starred_url":"https://api.github.com/users/allefbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allefbr/subscriptions","organizations_url":"https://api.github.com/users/allefbr/orgs","repos_url":"https://api.github.com/users/allefbr/repos","events_url":"https://api.github.com/users/allefbr/events{/privacy}","received_events_url":"https://api.github.com/users/allefbr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allefbr/curso-javascript-ninja","description":"Curso Javascript Ninja","fork":true,"url":"https://api.github.com/repos/allefbr/curso-javascript-ninja","forks_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/forks","keys_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/teams","hooks_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/hooks","issue_events_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/events","assignees_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/tags","blobs_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/languages","stargazers_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/stargazers","contributors_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/contributors","subscribers_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/subscribers","subscription_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/subscription","commits_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/merges","archive_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/downloads","issues_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/labels{/name}","releases_url":"https://api.github.com/repos/allefbr/curso-javascript-ninja/releases{/id}","created_at":"2015-10-27T14:12:16Z","updated_at":"2015-10-27T14:12:17Z","pushed_at":"2016-01-06T12:27:58Z","git_url":"git://github.com/allefbr/curso-javascript-ninja.git","ssh_url":"git@github.com:allefbr/curso-javascript-ninja.git","clone_url":"https://github.com/allefbr/curso-javascript-ninja.git","svn_url":"https://github.com/allefbr/curso-javascript-ninja","homepage":"http://blog.da2k.com.br/curso-javascript-ninja/","size":75,"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":"5bc3b7ef0710a871577faeed51a1f5c1d0d5806f","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":"2016-01-06T01:54:39Z","pushed_at":"2016-01-09T15:20: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":1126,"stargazers_count":56,"watchers_count":56,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":113,"forks":58,"open_issues":113,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/505"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/505"},"issue":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/505"},"comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/505/comments"},"review_comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/505/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/505/commits"},"statuses":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/f800309cbfe4a7873cef39e889cf78c415c288ec"}}}}