<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/PHx_6jZNe" -->

---
title: ES6 - Higher-Order Functions | daily.dev
description: In JavaScript, functions are treated as 'First Class' citizens. A function is fundamentally an object. We can assign properties to a function like 'Namaste' or...
canonical: https://daily.dev/posts/es6---higher-order-functions-phx-6jzne
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: ES6 - Higher-Order Functions | daily.dev
og:description: In JavaScript, functions are treated as 'First Class' citizens. A function is fundamentally an object. We can assign properties to a function like 'Namaste' or...
og:url: https://daily.dev/posts/es6---higher-order-functions-phx-6jzne
og:image: https://api.daily.dev/og/posts/PHx_6jZNe.png
og:image:alt: ES6 - Higher-Order Functions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ES6 - Higher-Order Functions

**[Hashnode](https://daily.dev/sources/hashnode)** · [@skay](https://daily.dev/skay) · 9 min read · 27 upvotes · 2 comments

## Summary

In JavaScript, functions are treated as 'First Class' citizens. A function is fundamentally an object. We can assign properties to a function like 'Namaste' or 'Hello' The forEach function was introduced with ES5 as Array.prototype.forEach and with ES6, it's simply referenced as. Array.map. The map function returns a function applied to every element of the original array.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.skay.dev/es6-higher-order-functions>

## Community discussion

Top comments from developers on daily.dev.

**@skay** · 6 upvotes

> A concise guide to all higher-order functions. A must read and good to bookmark for anytime reference.

**@iaros** · 0 upvotes

> Thanks a lot!

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/es6---higher-order-functions-phx-6jzne)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"ES6 - Higher-Order Functions","url":"https://daily.dev/posts/es6---higher-order-functions-phx-6jzne","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/es6---higher-order-functions-phx-6jzne"},"datePublished":"2020-10-14T06:30:58.159Z","dateModified":"2021-10-07T14:17:10.317Z","description":"In JavaScript, functions are treated as 'First Class' citizens. A function is fundamentally an object. We can assign properties to a function like 'Namaste' or...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f076613b27141de10e8adbb3b77c2bd2","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f076613b27141de10e8adbb3b77c2bd2","isAccessibleForFree":true,"articleSection":"Hashnode","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Skay","url":"https://daily.dev/skay","image":"https://avatars0.githubusercontent.com/u/62467382?v=4","description":"Full Stack Developer who loves building Products on the Web","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":1950}},"commentCount":2,"discussionUrl":"https://daily.dev/posts/es6---higher-order-functions-phx-6jzne","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":27},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"general-programming,javascript","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hashnode","item":"https://daily.dev/sources/hashnode"},{"@type":"ListItem","position":3,"name":"ES6 - Higher-Order Functions"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/es6---higher-order-functions-phx-6jzne","comment":[{"@type":"Comment","text":"A concise guide to all higher-order functions. A must read and good to bookmark for anytime reference.","datePublished":"2020-10-14T06:49:02.751Z","url":"https://daily.dev/posts/PHx_6jZNe#c-X0WJe9WMv","author":{"@type":"Person","name":"Skay","url":"https://daily.dev/skay","image":"https://avatars0.githubusercontent.com/u/62467382?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6}},{"@type":"Comment","text":"Thanks a lot!","datePublished":"2020-10-14T22:25:43.976Z","url":"https://daily.dev/posts/PHx_6jZNe#c-iR8bJeKRb","author":{"@type":"Person","name":"Iaroslav","url":"https://daily.dev/iaros","image":"https://lh3.googleusercontent.com/a-/AAuE7mBael5pTvP9IS0CBBf2sjYhBO_xQ3RW6YpVrPNR6w=s100"}}]}
```

