{"id":7397,"date":"2022-08-25T00:00:00","date_gmt":"2022-08-25T00:00:00","guid":{"rendered":"https:\/\/capitole-web-app-service-hvcegmd5ejaagmd7.northeurope-01.azurewebsites.net\/capitole-tech-article-higher-order-functions-2\/"},"modified":"2025-01-10T12:19:55","modified_gmt":"2025-01-10T12:19:55","slug":"capitole-tech-article-higher-order-functions","status":"publish","type":"post","link":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/","title":{"rendered":"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions"},"content":{"rendered":"<h1><span data-fusion-font=\"true\" style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 33px; line-height: 28px;\">Higher-Order Functions<\/span><\/h1>\n<p><span data-fusion-font=\"true\" style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 18px; line-height: 28px;\">Estoy seguro de que en m\u00e1s de una ocasi\u00f3n han escuchado hablar de<\/span><b data-fusion-font=\"true\" style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 18px; line-height: 28px;\"> las Higher-Order Functions<\/b><span data-fusion-font=\"true\" style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 18px; line-height: 28px;\">, pero \u00bfqu\u00e9 caracter\u00edsticas tienen estas funciones? Y m\u00e1s importante a\u00fan \u00bfpara qu\u00e9 nos sirven en nuestro d\u00eda a d\u00eda?<\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\">Las Higher-Order Functions son cualquier funci\u00f3n que cumpla con cualquiera de las siguientes dos caracter\u00edsticas: <\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\">Reciben una funci\u00f3n como par\u00e1metro <\/span><\/li>\n<li><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\">Retornan una funci\u00f3n <\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\">Estas dos caracter\u00edsticas le permiten a las Higher-Order Functions <\/span><b data-fusion-font=\"true\" style=\"font-size: 18px; line-height: 28px;\">generalizar un patr\u00f3n de c\u00f3digo y especializarlo por medio de las funciones que le pasamos como par\u00e1metros o de las funciones que retornamos<\/b><span style=\"font-weight: 400;\"><span data-fusion-font=\"true\" style=\"font-size: 18px; line-height: 28px;\">, veamos un ejemplo con la funci\u00f3n map de los arrays, nosotros sabemos que esta funci\u00f3n nos permite aplicar una transformaci\u00f3n sobre cada uno de los elementos de un array, pero empecemos por un caso en espec\u00edfico, el de multiplicar por dos cada uno de los elementos de un array<\/span> <\/span><\/p>\n<p><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 6px;\">function multiplyBy2(array) {<\/span><\/p>\n<p data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 6px;\">\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">const newArray =  \/\/ Crear nuevo array<\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">for(const number of array) { \/\/ Iteramos sobre el array original<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">newArray.push(number*2) \/\/ Importante: aqui aplicamos la transformaci\u00f2n<\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">}<\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">return newArray<\/p>\n<p><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 6px;\">}<\/span> <\/p>\n<p><span style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 18px; font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); line-height: 28px;\" data-fusion-font=\"true\"> <\/span><\/p>\n<p><span style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 18px; font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); line-height: 28px;\" data-fusion-font=\"true\">Esta funci\u00f3n trabaja bien, pero es solo un caso espec\u00edfico de un sin fin de transformaciones que podemos aplicar sobre un array, as\u00ed que usemos las Higher-Order Functions para <\/span><b style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: var(--body_typography-font-size); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing);\"><span data-fusion-font=\"true\" style=\"font-size: 18px; line-height: 28px;\">generalizar el algoritmo y luego especializarlo<\/span> <\/b><\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 0px;\">\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 24px;\" data-fusion-font=\"true\">function map(mapper, array) {<\/span><\/p>\n<p><span style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 17px; font-style: var(--body_typography-font-style,normal); font-weight: var(--body_typography-font-weight); letter-spacing: var(--body_typography-letter-spacing); line-height: 0px;\" data-fusion-font=\"true\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">const newArray =  \/\/ Crear nuevo array<\/span><br \/><\/span><\/p>\n<p><span style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 17px; font-style: var(--body_typography-font-style,normal); font-weight: var(--body_typography-font-weight); letter-spacing: var(--body_typography-letter-spacing); line-height: 0px;\" data-fusion-font=\"true\"><span data-fusion-font=\"true\" style=\"line-height: 6px;\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">for(const number of array) { \/\/ Iteramos sobre el array original<\/span><br \/><\/span><\/span><span data-fusion-font=\"true\" style=\"line-height: 6px;\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">newArray.push(mapper(number)) \/\/ usamos la funci\u00f2n mapper aplicar la transformaci\u00f2n<\/span><br \/><\/span><span style=\"color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 17px; font-style: var(--body_typography-font-style,normal); font-weight: var(--body_typography-font-weight); letter-spacing: var(--body_typography-letter-spacing); line-height: 0px;\" data-fusion-font=\"true\"><span data-fusion-font=\"true\" style=\"line-height: 6px;\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">}<\/span><br \/><\/span><\/span><span data-fusion-font=\"true\" style=\"line-height: 6px;\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">return newArray<\/span><br \/><\/span><span style=\"font-weight: 400; font-size: 17px; line-height: 0px;\" data-fusion-font=\"true\"><span data-fusion-font=\"true\" style=\"line-height: 6px;\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">}<\/span><br \/><\/span><\/span><span style=\"font-weight: 400; font-size: 17px; line-height: 0px;\" data-fusion-font=\"true\"><span data-fusion-font=\"true\" style=\"line-height: 6px;\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">\/\/ Uso<\/span><br \/><\/span><\/span><span style=\"font-weight: 400; font-size: 17px; line-height: 0px;\" data-fusion-font=\"true\"><span data-fusion-font=\"true\" style=\"line-height: 6px;\"><span data-fusion-font=\"true\" style=\"line-height: 24px;\">const numbers = <\/span><br \/><\/span><\/span><span style=\"font-weight: 400;\"><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 24px;\">map(number =&gt; number*2, numbers) \/\/ <\/span><\/span><\/p>\n<\/p>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\"><br \/><\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\">Esta funci\u00f3n map es una Higher-Order Functions porque recibe una funci\u00f3n como par\u00e1metro, esta funci\u00f3n map generaliza un patr\u00f3n de c\u00f3digo que es el que nos permite aplicar una transformaci\u00f3n sobre un array y lo especializamos a nuestro caso espec\u00edfico de multiplicar por 2 con la funci\u00f3n pasada por par\u00e1metro, tanto el array sobre el cual iteramos como la transformaci\u00f3n que aplicamos puede ser cualquiera. <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\">Ahora veamos otro ejemplo, imaginemos que tenemos en nuestras aplicaciones muchas funciones que hacen peticiones http y a su vez queremos que si estas fallan registrar ese error en un sistema de registro de errores, nosotros podr\u00edamos escribir un c\u00f3digo como el siguiente:<\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">async function getUsers() {<\/span><\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">try {<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">const users = await fetchingLibrary.get(&#8216;\/users&#8217;)<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">return users<\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">} catch (error) {<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">logError(error)<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">throw error<\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 6px;\" data-fusion-font=\"true\">}<\/p>\n<p><span style=\"font-weight: 400;\"><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 6px;\">}<\/span> <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\"> <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\">En este c\u00f3digo hacemos la petici\u00f3n, si hay alg\u00fan error hacemos log del error y hacemos throw del error para que el consumidor de la funci\u00f3n getUsers() maneje el error como le sea conveniente, ahora imaginen hacer esto por cada una de sus funciones que manejan errores, es repetitivo y es un detalle poco relevante a la hora de hacer la petici\u00f3n as\u00ed que usemos nuestra nueva herramienta para mejorar esto <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 18px; line-height: 28px;\" data-fusion-font=\"true\"> <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">function withErrorLogging(fn) {<\/span><\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">return async function executeOperation(&#8230;args) {<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">try {<\/p>\n<p style=\"padding-left: 120px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">const response = await fn(&#8230;args)<\/p>\n<p style=\"padding-left: 120px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">return response<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">} catch (error) {<\/p>\n<p style=\"padding-left: 120px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">logError(error)<\/p>\n<p style=\"padding-left: 120px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">throw error<\/p>\n<p style=\"padding-left: 80px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">}<\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">}<\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">} <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">\/\/ Uso <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">\/\/ Esta funci\u00f2n getUsers es equivalente a la funci\u00f2n que vimos al inicio const getUsers = withErrorLogging(() =&gt; {<\/span><\/p>\n<p style=\"padding-left: 40px; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">return fetchingLibrary.get(&#8216;\/users&#8217;)<\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">}) <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">\/\/ Y podemos usar getUsers para muchas otras funciones <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">const getPostByID = withErrorLogging((id) =&gt; { <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">return fetchingLibrary.get(`\/product\/${id}`) <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">}) <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">\/\/ Uso de getUsers <\/span><\/p>\n<p><span style=\"font-weight: 400;\"><span style=\"font-size: 17px; line-height: 5px;\" data-fusion-font=\"true\">const users = await getUsers()<\/span> <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 16px; line-height: 24px;\" data-fusion-font=\"true\"> <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 24px;\" data-fusion-font=\"true\">La funci\u00f3n withErrorLogging recibe una funci\u00f3n como par\u00e1metro que esperamos que retorne una promesa y retorna otra funci\u00f3n que llamamos executeOperation que se encargara de recolectar todos los argumentos que se le pasen usando el rest operator de Javascript, ejecutara la funci\u00f3n que pasamos como par\u00e1metro y retornara el resultado o har\u00e1 el registro del error en caso de error, la ventaja de esta higher order function es que esta funci\u00f3n withErrorLogging puede ser usada para agregarle a cualquier otra funci\u00f3n la capacidad de registro de errores. <\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 24px;\" data-fusion-font=\"true\"><br \/><\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 29px;\" data-fusion-font=\"true\">Espero que les haya gustado y por ultimo les comparto una serie de links que les pueden interesar<\/span><\/p>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/promises-fn-utils\"><span style=\"font-weight: 400; font-size: 17px; line-height: 29px;\" data-fusion-font=\"true\">promises-fn-utils <\/span><\/a><span style=\"font-weight: 400; font-size: 17px; line-height: 29px;\" data-fusion-font=\"true\">Esta librer\u00eda la hice yo y su idea es tener una serie de Higher-Order Functions para agregar capacidades a funciones que retornan promesas, como politicas de reintento, cache, batching y manejo de concurrencia. <\/span><\/p>\n<p><a href=\"https:\/\/kentcdodds.com\/blog\/inversion-of-control\"><span style=\"font-weight: 400; font-size: 17px; line-height: 29px;\" data-fusion-font=\"true\">Post de Kent C Dodds que habla un poco sobre este tema explicando inversi\u00f2n de<\/span><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 29px;\"> <\/span><span style=\"font-weight: 400; font-size: 17px; line-height: 29px;\" data-fusion-font=\"true\">control<\/span><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 29px;\"> <\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/refactoring.guru\/es\/design-patterns\/template-method\" data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 29px;\">Patr\u00f2n de dise\u00f1o templat<\/a><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 29px;\">e<\/span><\/span><span data-fusion-font=\"true\" style=\"font-size: 17px; line-height: 29px;\"> <\/span><span style=\"font-weight: 400; font-size: 17px; line-height: 29px;\" data-fusion-font=\"true\">Este patr\u00f3n de dise\u00f1o es la contraparte de las Higher-Order Functions en el mundo de la programaci\u00f3n orientada a objetos<\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 17px; line-height: 29px;\" data-fusion-font=\"true\"> <\/span><\/p>\n<p> Software Engineer<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Higher-Order Functions Estoy seguro de que en m\u00e1s de una ocasi\u00f3n han escuchado hablar de las Higher-Order Functions, pero \u00bfqu\u00e9 caracter\u00edsticas tienen estas funciones? Y m\u00e1s importante a\u00fan \u00bfpara qu\u00e9 nos sirven en nuestro d\u00eda a d\u00eda? Las Higher-Order Functions son cualquier funci\u00f3n que cumpla con cualquiera de las siguientes dos caracter\u00edsticas: Reciben una funci\u00f3n &#8230; <a title=\"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions\" class=\"read-more\" href=\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/\" aria-label=\"Leer m\u00e1s sobre JavaScript : Las caracter\u00edsticas de las Higher-Order Functions\">Leer m\u00e1s<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[26],"tags":[],"class_list":["post-7397","post","type-post","status-publish","format-standard","hentry","category-sin-categorizar"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JavaScript : Las caracter\u00edsticas de las Higher-Order Functions - Capitole<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions - Capitole\" \/>\n<meta property=\"og:description\" content=\"Higher-Order Functions Estoy seguro de que en m\u00e1s de una ocasi\u00f3n han escuchado hablar de las Higher-Order Functions, pero \u00bfqu\u00e9 caracter\u00edsticas tienen estas funciones? Y m\u00e1s importante a\u00fan \u00bfpara qu\u00e9 nos sirven en nuestro d\u00eda a d\u00eda? Las Higher-Order Functions son cualquier funci\u00f3n que cumpla con cualquiera de las siguientes dos caracter\u00edsticas: Reciben una funci\u00f3n ... Leer m\u00e1s\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Capitole\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.linkedin.com\/company\/capitole-consulting\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-25T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-10T12:19:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.capitole-consulting.com\/wp-content\/uploads\/2025\/01\/site-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Profile\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@capitolecons\" \/>\n<meta name=\"twitter:site\" content=\"@capitolecons\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Profile\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/\"},\"author\":{\"name\":\"Profile\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/person\/d7b96829eef3e34397feb4016bbb82fb\"},\"headline\":\"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions\",\"datePublished\":\"2022-08-25T00:00:00+00:00\",\"dateModified\":\"2025-01-10T12:19:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/\"},\"wordCount\":760,\"publisher\":{\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#organization\"},\"articleSection\":[\"Sin categorizar\"],\"inLanguage\":\"es\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/\",\"url\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/\",\"name\":\"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions - Capitole\",\"isPartOf\":{\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#website\"},\"datePublished\":\"2022-08-25T00:00:00+00:00\",\"dateModified\":\"2025-01-10T12:19:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.capitole-consulting.com\/es\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#website\",\"url\":\"https:\/\/test.capitole-consulting.com\/es\/\",\"name\":\"Capitole Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.capitole-consulting.com\/es\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#organization\",\"name\":\"Capitole Consulting\",\"url\":\"https:\/\/test.capitole-consulting.com\/es\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/logo\/image\/\",\"url\":\"\/wp-content\/uploads\/2025\/01\/logo.png\",\"contentUrl\":\"\/wp-content\/uploads\/2025\/01\/logo.png\",\"width\":800,\"height\":800,\"caption\":\"Capitole Consulting\"},\"image\":{\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/capitole-consulting\/\",\"https:\/\/x.com\/capitolecons\",\"https:\/\/www.youtube.com\/@capitoleconsulting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/person\/d7b96829eef3e34397feb4016bbb82fb\",\"name\":\"Profile\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4f57b47b5461dad1b3a9f593721c39da340405ad05d7ebee2deb2febd34e6990?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4f57b47b5461dad1b3a9f593721c39da340405ad05d7ebee2deb2febd34e6990?s=96&d=mm&r=g\",\"caption\":\"Profile\"},\"sameAs\":[\"https:\/\/capitole-web-app-service-hvcegmd5ejaagmd7.northeurope-01.azurewebsites.net\"],\"url\":\"https:\/\/test.capitole-consulting.com\/es\/blog\/author\/operations-tech\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions - Capitole","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"es_ES","og_type":"article","og_title":"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions - Capitole","og_description":"Higher-Order Functions Estoy seguro de que en m\u00e1s de una ocasi\u00f3n han escuchado hablar de las Higher-Order Functions, pero \u00bfqu\u00e9 caracter\u00edsticas tienen estas funciones? Y m\u00e1s importante a\u00fan \u00bfpara qu\u00e9 nos sirven en nuestro d\u00eda a d\u00eda? Las Higher-Order Functions son cualquier funci\u00f3n que cumpla con cualquiera de las siguientes dos caracter\u00edsticas: Reciben una funci\u00f3n ... Leer m\u00e1s","og_url":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/","og_site_name":"Capitole","article_publisher":"https:\/\/www.linkedin.com\/company\/capitole-consulting\/","article_published_time":"2022-08-25T00:00:00+00:00","article_modified_time":"2025-01-10T12:19:55+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/test.capitole-consulting.com\/wp-content\/uploads\/2025\/01\/site-image.png","type":"image\/png"}],"author":"Profile","twitter_card":"summary_large_image","twitter_creator":"@capitolecons","twitter_site":"@capitolecons","twitter_misc":{"Escrito por":"Profile","Tiempo de lectura":"4 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/#article","isPartOf":{"@id":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/"},"author":{"name":"Profile","@id":"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/person\/d7b96829eef3e34397feb4016bbb82fb"},"headline":"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions","datePublished":"2022-08-25T00:00:00+00:00","dateModified":"2025-01-10T12:19:55+00:00","mainEntityOfPage":{"@id":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/"},"wordCount":760,"publisher":{"@id":"https:\/\/test.capitole-consulting.com\/es\/#organization"},"articleSection":["Sin categorizar"],"inLanguage":"es"},{"@type":"WebPage","@id":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/","url":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/","name":"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions - Capitole","isPartOf":{"@id":"https:\/\/test.capitole-consulting.com\/es\/#website"},"datePublished":"2022-08-25T00:00:00+00:00","dateModified":"2025-01-10T12:19:55+00:00","breadcrumb":{"@id":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test.capitole-consulting.com\/es\/blog\/capitole-tech-article-higher-order-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.capitole-consulting.com\/es\/"},{"@type":"ListItem","position":2,"name":"JavaScript : Las caracter\u00edsticas de las Higher-Order Functions"}]},{"@type":"WebSite","@id":"https:\/\/test.capitole-consulting.com\/es\/#website","url":"https:\/\/test.capitole-consulting.com\/es\/","name":"Capitole Consulting","description":"","publisher":{"@id":"https:\/\/test.capitole-consulting.com\/es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.capitole-consulting.com\/es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/test.capitole-consulting.com\/es\/#organization","name":"Capitole Consulting","url":"https:\/\/test.capitole-consulting.com\/es\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/logo\/image\/","url":"\/wp-content\/uploads\/2025\/01\/logo.png","contentUrl":"\/wp-content\/uploads\/2025\/01\/logo.png","width":800,"height":800,"caption":"Capitole Consulting"},"image":{"@id":"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/capitole-consulting\/","https:\/\/x.com\/capitolecons","https:\/\/www.youtube.com\/@capitoleconsulting"]},{"@type":"Person","@id":"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/person\/d7b96829eef3e34397feb4016bbb82fb","name":"Profile","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/test.capitole-consulting.com\/es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4f57b47b5461dad1b3a9f593721c39da340405ad05d7ebee2deb2febd34e6990?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4f57b47b5461dad1b3a9f593721c39da340405ad05d7ebee2deb2febd34e6990?s=96&d=mm&r=g","caption":"Profile"},"sameAs":["https:\/\/capitole-web-app-service-hvcegmd5ejaagmd7.northeurope-01.azurewebsites.net"],"url":"https:\/\/test.capitole-consulting.com\/es\/blog\/author\/operations-tech\/"}]}},"_links":{"self":[{"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/posts\/7397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/comments?post=7397"}],"version-history":[{"count":0,"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/posts\/7397\/revisions"}],"wp:attachment":[{"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/media?parent=7397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/categories?post=7397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.capitole-consulting.com\/es\/wp-json\/wp\/v2\/tags?post=7397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}