{"id":1446,"date":"2024-10-11T11:39:25","date_gmt":"2024-10-11T14:39:25","guid":{"rendered":"https:\/\/desvendandoocodigo.com.br\/?p=1446"},"modified":"2024-10-11T11:42:23","modified_gmt":"2024-10-11T14:42:23","slug":"resumo-da-live-tiktok-11-10-2024","status":"publish","type":"post","link":"https:\/\/desvendandoocodigo.com.br\/?p=1446","title":{"rendered":"Resumo da Live TikTok 11\/10\/2024"},"content":{"rendered":"\n<p>Ol\u00e1 Pessoal! <\/p>\n\n\n\n<p>Na Live do dia 11\/10\/2024  Trabalhamos com os m\u00e9todos Map Filter e Reduce.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FOR \n\nvar nome = \"Marcos\";\n\nvar tamanho = nome.length;\n\nfor( let contador = 1; contador &lt;= tamanho; contador ++){\n    console.log(' Etapa ' ,  contador);\n}\n\n\n\nMAP\n\nconst numeros = &#91;1,2,3,4,5];\n\/\/ indice        0 1 2 3 4\n\nconst dobrados = &#91;];\n\nfor(let i = 0; i &lt; numeros.length; i ++ ){\n\n    dobrados.push(numeros&#91;i] * 2);\n}\nconsole.log('Resultado com FOR ', dobrados);\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nconst numeros2 = &#91;1,2,3,4,5];\n\nconst dobrados2 =\n numeros2.map( numero =&gt; numero * 2 );\n\n console.log('Resultado com MAP ', dobrados2);\n\n\nFILTER\n\nconst numeros = &#91;1,2,3,4,5,6];\nconst pares = &#91;];\n\nfor(let i = 0; i &lt;numeros.length; i ++){\n    if( numeros&#91;i] % 2 === 0){ \/\/verdadeiro\n        pares.push(numeros&#91;i]);\n    }\n}\nconsole.log(\"Resultado com o FOR \", pares);\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nconst numeros2 = &#91;1,2,3,4,5,6];\nconst pares2 =\n numeros2.filter( numero =&gt; numero % 2 === 0 );\n\nconsole.log(\"Resultado com o FILTER \", pares2);\n\nREDUCE\n\nconst numeros = &#91;1,2,3,4,5];\nlet soma = 0;\n\nfor (let i = 0; i &lt; numeros.length; i++ ){\n    soma += numeros&#91;i];\n}\nconsole.log('Resultado com o FOR ', soma);\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\nconst numeros2 = &#91;1,2,3,4,5];\nlet soma2 =\nnumeros2.reduce( ( acumulador, valorAtual ) =&gt;\n    acumulador + valorAtual, 0\n);\nconsole.log('Resultado com o REDUCE ', soma2);\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"321\" src=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png\" alt=\"\" class=\"wp-image-162\" style=\"width:134px;height:auto\" srcset=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png 1000w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-300x96.png 300w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-768x247.png 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/V89811082M?dp=1\">https:\/\/go.hotmart.com\/V89811082M?dp=1<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/X90111663X?dp=1\">https:\/\/go.hotmart.com\/X90111663X?dp=1<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>HOR\u00c1RIO DAS LIVES<\/strong><\/p>\n\n\n\n<p>Domingo e Segunda \u00e0s 19:00hs<\/p>\n\n\n\n<p>Quarta \u00e0s 18:00hs<\/p>\n\n\n\n<p>Quinta e Sexta \u00e0s 9:30hs<\/p>\n\n\n\n<p> S\u00e1bado \u00e0s 20:00hs<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Programa\u00e7\u00e3o do zero ao avan\u00e7ado |  #cursodejavascript\" width=\"960\" height=\"540\" src=\"https:\/\/www.youtube.com\/embed\/m5WLUQAZ0vA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Ol\u00e1 Pessoal! Na Live do dia 11\/10\/2024 Trabalhamos com os m\u00e9todos Map Filter e Reduce. https:\/\/go.hotmart.com\/V89811082M?dp=1 https:\/\/go.hotmart.com\/X90111663X?dp=1 HOR\u00c1RIO DAS LIVES Domingo e Segunda \u00e0s 19:00hs Quarta \u00e0s 18:00hs Quinta e Sexta \u00e0s 9:30hs S\u00e1bado \u00e0s 20:00hs<\/p>\n","protected":false},"author":1,"featured_media":1097,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1446"}],"collection":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1446"}],"version-history":[{"count":2,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1446\/revisions"}],"predecessor-version":[{"id":1448,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1446\/revisions\/1448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/media\/1097"}],"wp:attachment":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}