{"action":"created","comment":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/31978776","id":31978776,"diff_hunk":"@@ -1,52 +1,61 @@\n /*\n Crie um array com 5 items (tipos variados).\n */\n-// ?\n-\n+var arr = [ 'Anderson', true, {daciuk: 'feio'}, function(){},[1,2,3] ];","path":"challenge-07/challenge-07.js","position":6,"original_position":6,"commit_id":"25e52775dc37b22092b67a32f7bbfcca9fc43b81","original_commit_id":"25e52775dc37b22092b67a32f7bbfcca9fc43b81","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":"Como assim cara? :joy: :joy: ","created_at":"2015-06-09T02:30:39Z","updated_at":"2015-06-09T02:30:39Z","html_url":"https://github.com/da2k/curso-javascript-ninja/pull/143#discussion_r31978776","pull_request_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/31978776"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/143#discussion_r31978776"},"pull_request":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/143","id":37211895,"html_url":"https://github.com/da2k/curso-javascript-ninja/pull/143","diff_url":"https://github.com/da2k/curso-javascript-ninja/pull/143.diff","patch_url":"https://github.com/da2k/curso-javascript-ninja/pull/143.patch","issue_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/143","number":143,"state":"open","locked":false,"title":" Update challenge-07","user":{"login":"andersonweb","id":3930770,"avatar_url":"https://avatars.githubusercontent.com/u/3930770?v=3","gravatar_id":"","url":"https://api.github.com/users/andersonweb","html_url":"https://github.com/andersonweb","followers_url":"https://api.github.com/users/andersonweb/followers","following_url":"https://api.github.com/users/andersonweb/following{/other_user}","gists_url":"https://api.github.com/users/andersonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/andersonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersonweb/subscriptions","organizations_url":"https://api.github.com/users/andersonweb/orgs","repos_url":"https://api.github.com/users/andersonweb/repos","events_url":"https://api.github.com/users/andersonweb/events{/privacy}","received_events_url":"https://api.github.com/users/andersonweb/received_events","type":"User","site_admin":false},"body":"Algumas duvidas que tive.\r\nO exercício foi bem tranquilo, só me peguei um pouco na parte de estruturas de repetição.\r\nAntes de assistir a correção eu tinha feito as questões de estrutura de repetição assim:\r\n\r\n<code>\r\nvar num = 10;\r\nwhile( num <= 20) {\r\n\tconsole.log(num++);\r\n\tnum++;\r\n}\r\n</code>\r\n\r\nDessa forma deu certo, ele imprimiu todos os números pares entre 10 e 20. A duvida é o seguinte, como isso funciona ?\r\nMeu jeito de ler essa estrutura: \r\nNúmero é menor ou igual a 20 ? <code>true</code>, retorne o valor de <code>num</code> mais <code>1</code>, até aqui ele vale <code>11</code>, certo ? E depois soma <code> +1</code> novamente. Porque o primeiro resultado ele retorna <code>100</code>.\r\nSei que esse exemplo estar bem longe de ser um boa prática, mas tive essa duvida.\r\nE como ocorre esse processo ? Como o Javascript ler?\r\n\r\nNo exemplo impar, fiz assim: \r\n<code>\r\nvar num = 10;\r\nwhile ( num < 20 ) {\r\n\tnum++;\r\n\tconsole.log(num++);\r\n}\r\n</code>\r\nO porque ele retorna os impares ?\r\nEstou somando um e depois, imprimo o valor e some mais um, ele não deveria retornar igualmente a cima ?\r\nE como ocorre esse processo ? Como o Javascript ler?\r\nEssa parte foi a que me pegou... \r\nApliquei a condição ternário juntamente com o modulo e ficou bem mais simples, só queria saber o porque eles retornam isso aí! \r\n","created_at":"2015-06-09T01:22:04Z","updated_at":"2015-06-09T02:30:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3646fd1ceede44bfa221834271f40484badaa703","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/143/commits","review_comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/143/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/143/comments","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/25e52775dc37b22092b67a32f7bbfcca9fc43b81","head":{"label":"andersonweb:challenge-07","ref":"challenge-07","sha":"25e52775dc37b22092b67a32f7bbfcca9fc43b81","user":{"login":"andersonweb","id":3930770,"avatar_url":"https://avatars.githubusercontent.com/u/3930770?v=3","gravatar_id":"","url":"https://api.github.com/users/andersonweb","html_url":"https://github.com/andersonweb","followers_url":"https://api.github.com/users/andersonweb/followers","following_url":"https://api.github.com/users/andersonweb/following{/other_user}","gists_url":"https://api.github.com/users/andersonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/andersonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersonweb/subscriptions","organizations_url":"https://api.github.com/users/andersonweb/orgs","repos_url":"https://api.github.com/users/andersonweb/repos","events_url":"https://api.github.com/users/andersonweb/events{/privacy}","received_events_url":"https://api.github.com/users/andersonweb/received_events","type":"User","site_admin":false},"repo":{"id":33542266,"name":"curso-javascript-ninja","full_name":"andersonweb/curso-javascript-ninja","owner":{"login":"andersonweb","id":3930770,"avatar_url":"https://avatars.githubusercontent.com/u/3930770?v=3","gravatar_id":"","url":"https://api.github.com/users/andersonweb","html_url":"https://github.com/andersonweb","followers_url":"https://api.github.com/users/andersonweb/followers","following_url":"https://api.github.com/users/andersonweb/following{/other_user}","gists_url":"https://api.github.com/users/andersonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/andersonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersonweb/subscriptions","organizations_url":"https://api.github.com/users/andersonweb/orgs","repos_url":"https://api.github.com/users/andersonweb/repos","events_url":"https://api.github.com/users/andersonweb/events{/privacy}","received_events_url":"https://api.github.com/users/andersonweb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andersonweb/curso-javascript-ninja","description":"Curso Javascript Ninja","fork":true,"url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja","forks_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/forks","keys_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/teams","hooks_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/hooks","issue_events_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/events","assignees_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/tags","blobs_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/languages","stargazers_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/stargazers","contributors_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/contributors","subscribers_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/subscribers","subscription_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/subscription","commits_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/merges","archive_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/downloads","issues_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/labels{/name}","releases_url":"https://api.github.com/repos/andersonweb/curso-javascript-ninja/releases{/id}","created_at":"2015-04-07T12:38:34Z","updated_at":"2015-05-06T02:46:07Z","pushed_at":"2015-06-08T12:45:09Z","git_url":"git://github.com/andersonweb/curso-javascript-ninja.git","ssh_url":"git@github.com:andersonweb/curso-javascript-ninja.git","clone_url":"https://github.com/andersonweb/curso-javascript-ninja.git","svn_url":"https://github.com/andersonweb/curso-javascript-ninja","homepage":"http://blog.da2k.com.br/curso-javascript-ninja/","size":220,"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":"639ca7931c74171d110903fdd2a5240d1ad74e49","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-06-06T18:06:33Z","pushed_at":"2015-06-09T01:44:18Z","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":2078,"stargazers_count":27,"watchers_count":27,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":26,"forks":30,"open_issues":26,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/143"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/143"},"issue":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/143"},"comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/143/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/143/commits"},"statuses":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/25e52775dc37b22092b67a32f7bbfcca9fc43b81"}}}}