Best Resources to Learn Functional Programming in JavaScript

Master functional JavaScript from beginner to advanced with this list of selected online resources

Marina Eremina
DailyJS
5 min readOct 23, 2019

--

A slightly opened laptop
Photo by Philipp Katzenberger on Unsplash

JavaScript is a multi-paradigm programming language that among others supports functional style.

There is quite a large amount of resources on the Internet that one can use to learn concepts of functional programming and how to apply them in JavaScript. Since these online resources are intended for different audiences and composed with different levels of complexity, you may be forced to spend a lot of precious time on browsing and looking for articles and tutorials that fit your knowledge level and needs.

In this article I want to present a list of online resources which in my own experience work best to learn functional JavaScript when you are completely new to it.

I would recommend starting with brief introductions which describe fundamental functional programming concepts in a clear and beginner-friendly way. After learning the basics you can gradually proceed to advanced resources that cover functional programming techniques and present practical examples of modern functional JavaScript.

This article is mainly intended for JavaScript developers that are looking for the best way to learn functional programming. It can be also useful for developers that are familiar with functional programming fundamentals and looking for resources that provide examples of JavaScript code written in a functional style.

Beginner-friendly introductions to functional programming

Beginner-friendly introductions cover the basics of functional JavaScript in a clear and informative way. They are perfect to start with if you are completely new to functional programming.

These articles and talks discuss benefits of writing functional code and examine the difference between functional and object-oriented styles.

They cover the most important concepts of functional programming and make you familiar with language features and techniques used to write functional code. All these resources have simple code examples to illustrate the theoretical concepts.

After reading these articles and listening to talks, you will understand the core functional programming principles and get comfortable with the vocabulary. It is fine if not everything makes sense immediately, as soon as you learn further and start using functional concepts and techniques in practice, they will make perfect sense to you.

1. Learning Functional Programming with JavaScript talk by Anjana Vakil at JSConf. One of the best beginner-friendly introductions to functional JavaScript, well-structured and clearly presented. It assumes no prior knowledge of functional programming.

2. An introduction to Functional Programming with JavaScript by Flavio Copes. This article covers functional programming concepts and techniques which are used to write functional code. It provides good code examples that make each concept easier to understand.

3. Master the JavaScript Interview: What is Functional Programming? by Eric Elliott. This article gives you insight into the essence of functional programming. It presents functional programming fundamentals in a clear, brief and comprehensive way. A must-read for anyone who wants to learn functional JavaScript.

4. Functional Programming Fundamentals talk by Matthew Gerstman at React NYC (if you prefer to read, look at this article instead). This talk goes a little beyond the basics, but stays beginner-friendly and provides helpful code examples. Most importantly it also explains when functional programming can be most useful.

5. An introduction to functional programming in JavaScript by Matt Banz. Except for covering the functional programming concepts, this article gives you an idea to what extent you can apply them in the real-world JavaScript apps.

Series of articles

The series of articles cover the same theoretical concepts as brief introductions but in a broader and more detailed way. They provide plenty of helpful code examples to illustrate theoretical concepts. I would recommend starting with the series when you have already an understanding of the essence of functional style.

1. Blog post series on functional programming in JavaScript by Eric Elliott. This in-depth series covers a large variety of basic and advanced functional programming techniques and how they apply to modern JavaScript.

2. So You Want to be a Functional Programmer by Charles Scalfani. An informative series of articles with code examples in JavaScript and Elm. All six parts of the series can be found here.

3. Functional JS by Krzysztof Czernek. This series is written in a beginner-friendly and descriptive way. The series has seven parts already published and is still in progress. Links to all published parts can be found here.

Practical guides

Practical guides provide a minimum of theory and concentrate on code instead. They are useful when you have a good grasp of functional style and want to learn how functional programming concepts can be applied to your JavaScript programs. You will find here practical examples of how procedural or object-oriented code can be written in a functional style.

1. A practical introduction to functional programming by Mary Rose Cook. This article gives a great introduction to functional programming in general and demonstrates how the unfunctional code can be translated into functional style. The code examples in the article are in Python, but you can find all of them converted to JavaScript in this gist article written by Ritesh Keswani.

I believe it might be useful for you to take a look at the original article despite Python examples since it presents the functional techniques most clearly and concisely. In addition, it gives the best guide rope that helps you to proceed with further learning.

2. Basic Functional Programming Patterns in JavaScript by Nested Software. This article demonstrates how common procedural patterns can be replaced with functional ones in JavaScript.

3. Functional Programming Basics In ES6 talk by Jeremy Fairbank. In this talk you will find a lot of examples of how functional programming techniques can be implemented in ES6.

4. Functional programming in JavaScript video series by Fun Fun Function. You’ll find here code examples of functional programming in JavaScript.

5. JavaScript Snake Game Tutorial Using Functional Programming video tutorial by Christopher Okhravi. This tutorial shows how to build a Snake Game in JavaScript in a functional style.

Courses

I think it is useful to mention some paid courses that can teach you functional programming in JavaScript. If taking a course is your preferred way to study or you want to deepen your knowledge of functional JavaScript then perhaps these courses could be suitable for you.

1. Functional Programming in JavaScript: A Practical Guide by Steven Hancock. This course presents functional programming principles and offers exercises for most of the theoretical concepts.

2. Functional Programming For Beginners With JavaScript by James Moore. Except for covering the theoretical concepts this course teaches you how to build front-end web applications in a functional style.

3. Functional-Light JavaScript by Kyle Simpson. A course for experienced JavaScript developers who want to learn advanced functional programming concepts.

Thanks a lot for reading this article, I hope you will find it useful. Learning functional programming can be challenging for beginners but all the effort you invest in studying will surely pay off.

I hope that the learning roadmap suggested in this article will help you to start studying functional JavaScript fast and effectively. It is likely that I missed some great learning resources, so feel free to suggest more of them in the comments.

--

--

Marina Eremina
DailyJS
Writer for

I enjoy learning new things and sharing what I’ve learned