{"id":5512,"date":"2025-04-01T10:49:48","date_gmt":"2025-04-01T15:49:48","guid":{"rendered":"https:\/\/frontendmasters.com\/blog\/?p=5512"},"modified":"2025-04-01T10:49:49","modified_gmt":"2025-04-01T15:49:49","slug":"fancy-foreach-with-functional-programming-in-javascript","status":"publish","type":"post","link":"https:\/\/frontendmasters.com\/blog\/fancy-foreach-with-functional-programming-in-javascript\/","title":{"rendered":"Fancy forEach with functional programming in JavaScript"},"content":{"rendered":"\n<p><a href=\"https:\/\/blakewatson.com\/journal\/fancy-foreach-with-functional-programming-in-javascript\/\">I enjoyed this blog post from Blake Watson<\/a> about a simple requirement and then going down the rabbit hole of functional programming to solve it in increasingly reusable, if mind-bending ways. By the end:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Creating a function that returns a function that returns a function can get a little trippy to think about. But what we\u2019ve done is make our work reusable and flexible.<\/p>\n<\/blockquote>\n\n\n\n<p>Blake admits he didn&#8217;t actually use the fully functional abstracted functional version. I vibe with that. Take it as far as you can without sacrificing clarity. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I enjoyed this blog post from Blake Watson about a simple requirement and then going down the rabbit hole of functional programming to solve it in increasingly reusable, if mind-bending ways. By the end: Creating a function that returns a function that returns a function can get a little trippy to think about. But what [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5517,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29],"tags":[320,319,3],"class_list":["post-5512","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-beat","tag-foreach","tag-functional-programming","tag-javascript"],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2025\/04\/create-a-featured-image-that-visually-represents-the-concept-of.png?fit=1024%2C768&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/5512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/comments?post=5512"}],"version-history":[{"count":1,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/5512\/revisions"}],"predecessor-version":[{"id":5518,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/5512\/revisions\/5518"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media\/5517"}],"wp:attachment":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media?parent=5512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/categories?post=5512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/tags?post=5512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}