{"id":1122,"date":"2026-04-16T21:11:10","date_gmt":"2026-04-16T21:11:10","guid":{"rendered":"https:\/\/javigomez.org\/?p=1122"},"modified":"2026-04-16T21:12:38","modified_gmt":"2026-04-16T21:12:38","slug":"metodos-para-tratar-arrays","status":"publish","type":"post","link":"https:\/\/javigomez.org\/index.php\/2026\/04\/16\/metodos-para-tratar-arrays\/","title":{"rendered":"M\u00e9todos para tratar arrays"},"content":{"rendered":"\n<p>\u2728 filter() \u2013 Retorna un nuevo array con los elementos que coincidan con la condici\u00f3n<br>\u2728 map() \u2013 Transforma cada elemento en algo nuevo<br>\u2728 find() \u2013 Da el primer elemento encontrado<br>\u2728 findIndex() \u2013 Retorna el \u00edndice del primer elemento encontrado<br>\u2728 fill() \u2013 Cambia elementos por un valor fijo, modificando el array<br>\u2728 every() \u2013 Comprueba si todos los elementos cumplen la condici\u00f3n<br>\u2728 some() \u2013 Comprueba si al menos un elemento cumple la condici\u00f3n<br>\u2728 concat() \u2013 Junta arrays en un nuevo array<br>\u2728 includes() \u2013 Comprueba si un valor existe en el array<br>\u2728 push() \u2013 A\u00f1ade elementos al final del array, modific\u00e1ndolo<br>\u2728 pop() \u2013 Quita el \u00faltimo elemento del array, modific\u00e1ndolo<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"1024\" src=\"https:\/\/javigomez.org\/wp-content\/uploads\/2026\/04\/1775445458696-576x1024.gif\" alt=\"\" class=\"wp-image-1124\" srcset=\"https:\/\/javigomez.org\/wp-content\/uploads\/2026\/04\/1775445458696-576x1024.gif 576w, https:\/\/javigomez.org\/wp-content\/uploads\/2026\/04\/1775445458696-169x300.gif 169w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u2728 filter() \u2013 Retorna un nuevo array con los elementos que coincidan con la condici\u00f3n\u2728 map() \u2013 Transforma cada elemento en algo nuevo\u2728 find() \u2013 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":1126,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[40,204],"class_list":["post-1122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-array","tag-javascript"],"_links":{"self":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/comments?post=1122"}],"version-history":[{"count":2,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1122\/revisions"}],"predecessor-version":[{"id":1125,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1122\/revisions\/1125"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media\/1126"}],"wp:attachment":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media?parent=1122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/categories?post=1122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/tags?post=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}