{"action":"created","comment":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/35493709","id":35493709,"diff_hunk":"@@ -1,97 +1,145 @@\n-/*\n-Envolva todo o código desse desafio em uma IIFE.\n-*/\n+(function(){\n+\t/*\n+\tEnvolva todo o código desse desafio em uma IIFE.\n+\t*/\n \n-/*\n-Crie um array chamado numberObjects. Esse array deve ter 10 elementos. Cada\n-elemento será um objeto no formato:\n-{ number: [NUMBER] }\n-Os números devem ser de 1 a 10.\n-Mostre esse array no console.\n-*/\n-console.log( 'Number Objects Array:' );\n-// ?\n+\t/*\n+\tCrie um array chamado numberObjects. Esse array deve ter 10 elementos. Cada\n+\telemento será um objeto no formato:\n+\t{ number: [NUMBER] }\n+\tOs números devem ser de 1 a 10.\n+\tMostre esse array no console.\n+\t*/\n+\tconsole.log( 'Number Objects Array:' );\n+\tvar numberObjects = [\n+\t\t{number: 1},\n+\t\t{number: 2},\n+\t\t{number: 3},\n+\t\t{number: 4},\n+\t\t{number: 5},\n+\t\t{number: 6},\n+\t\t{number: 7},\n+\t\t{number: 8},\n+\t\t{number: 9},\n+\t\t{number: 10}\n+\t];\n+\tconsole.log(numberObjects);\n \n-/*\n-Crie um array chamado `justNumbers`, que terá como elementos somente os\n-números do array criado acima. Mostre esse novo array no console.\n-*/\n-console.log( '\\nJust Numbers:' );\n-// ?\n+\t/*\n+\tCrie um array chamado `justNumbers`, que terá como elementos somente os\n+\tnúmeros do array criado acima. Mostre esse novo array no console.\n+\t*/\n+\tconsole.log( '\\nJust Numbers:' );\n+\tvar justNumbers = [];\n+\tnumberObjects.forEach(function(item){","path":"challenge-14/challenge-14.js","position":52,"original_position":52,"commit_id":"647907c42512db4a03ac4e1d69e4a06e9b9d35c8","original_commit_id":"647907c42512db4a03ac4e1d69e4a06e9b9d35c8","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":"Na correção do exercício você usa <code>map()</code>...\r\nUsando o <code> forEach</code> tive mais trabalho e mais código, mas em relação a performance, os dois são semelhantes? :facepunch: ","created_at":"2015-07-26T14:53:17Z","updated_at":"2015-07-26T14:53:17Z","html_url":"https://github.com/da2k/curso-javascript-ninja/pull/225#discussion_r35493709","pull_request_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/225","_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/35493709"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/225#discussion_r35493709"},"pull_request":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/225"}}},"pull_request":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/225","id":40837647,"html_url":"https://github.com/da2k/curso-javascript-ninja/pull/225","diff_url":"https://github.com/da2k/curso-javascript-ninja/pull/225.diff","patch_url":"https://github.com/da2k/curso-javascript-ninja/pull/225.patch","issue_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/225","number":225,"state":"open","locked":false,"title":"Challenge 14","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":"","created_at":"2015-07-25T14:27:15Z","updated_at":"2015-07-26T14:53:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ed9e1d50ddc3f461494450bb2726d11f6af4d52","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/225/commits","review_comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/225/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/225/comments","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/647907c42512db4a03ac4e1d69e4a06e9b9d35c8","head":{"label":"andersonweb:challenge-14","ref":"challenge-14","sha":"647907c42512db4a03ac4e1d69e4a06e9b9d35c8","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-07-25T14:26:31Z","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":273,"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":"da52aa4ca3d81fbccefc91a8d366f8aba1aea0dd","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-07-20T01:12:40Z","pushed_at":"2015-07-25T22:37:09Z","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":2073,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":41,"forks":38,"open_issues":41,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/225"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/225"},"issue":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/225"},"comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/225/comments"},"review_comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/225/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/225/commits"},"statuses":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/647907c42512db4a03ac4e1d69e4a06e9b9d35c8"}}}}