Learn Functional Programming With JavaScript | FREE COURSE
► Download popular JavaScript templates:
Join Jeremy McPeak as he teaches you the core concepts of functional programming with JavaScript.
JavaScript is one of the most interesting programming languages, simply because you can write software in a variety of different ways. We primarily live in an object-oriented world, but we’re not bound to that paradigm. We can also take a functional programming approach.
By the end of this course, you will understand concepts like first-class functions, immutability, composing functions, currying, and even how to work with the DOM in a functional way.
Explore the source code:
1 Introduction
1.1 Introduction 00:00:00
In this course, you’ll learn how to use first-class functions, immutability, composing functions, currying, and even how to work with the DOM in a functional way. Let’s get started!
1.2 What You Need 00:01:53
Let’s set up an environment we can use for developing with JavaScript. You’ll need Node and a code editor.
2 Basic Concepts
2.1 First-Class Functions 00:07:10
In JavaScript, functions are first-class objects. They are a type of data we can assign to variables, pass to other functions, and even return functions from within another function. It’s a powerful feature and is central to functional programming.
2.2 Declarative Programming 00:12:53
Functional programming takes a declarative approach for writing code. It’s a common (and very trendy) way of writing code. We’ll examine declarative programming and compare it to imperative programming in this lesson.
2.3 Pure and Impure Functions 00:17:47
There are two types of functions in functional programming: pure and impure. You’ll learn the difference between the two in this lesson.
2.4 Immutability 00:21:27
We typically work with immutable data in functional programming. It may seem like more work to program immutably, and inefficient to boot, but there are benefits to using immutable data. You’ll learn why in this lesson.
3 Building a Functional Project
3.1 Introducing Composition 00:27:18
One key aspect of functional programming is the concept of composition: composing multiple functions into one. You’ll learn the two types of composition in this lesson.
3.2 Using Composition 00:34:28
Now that you know the types of composition, we’ll compose multiple functions together to build an HTML element.
3.3 Currying Functions 00:41:11
Currying can be a difficult concept to grasp at first, but it is extremely powerful and lets us create partial functions.
3.4 Writing a Functional Web App 00:48:12
Most of the code we’ve written just creates helper functions. In this lesson, we’ll start writing our application code to display messages on the page.
3.5 Handling Events 00:56:53
Handling events in a functional way is not very different from the procedural way, except now we curry our event setup functions. I’ll show you how to do that so we can complete our application in this lesson.
4 Working With Arrays
4.1 Understanding map() 01:05:29
One of the most useful and underused operations in all programming is the idea of a map—transforming an array into another array. I’ll show you how to do that with JavaScript’s map() method.
4.2 Filtering Arrays 01:16:11
It’s very common to want to filter an array into a smaller set of data. In this lesson, you’ll learn how with the filter() method.
4.3 Reducing Arrays 01:22:18
The reduce() operation is very useful, and you’ll learn how it works and how to apply it in this lesson.
5 Conclusion
5.1 Conclusion 01:32:15
Functional programming with JavaScript is a completely different paradigm than what we’re used to, and it requires us to rethink how we approach common problems. Functional programming can be elegant and expressive, and with concepts like composition and currying, we have some pretty ingenious ways of reusing code.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Envato Tuts
Discover free how-to tutorials and online courses. Design a logo, create a website, build an app, or learn a new skill:
Envato Elements
► Download Unlimited Stock Photos, Fonts & Templates with Envato Elements:
► Subscribe to Envato Tuts on YouTube:
► Follow Envato Tuts on Twitter:
► Follow Envato Tuts on Facebook:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - functional programming in javascript
1 view
343
89
4 weeks ago 00:04:33 1
Tai Chi for Ultimate Wellness: Relieve Fatigue, Alleviate Pain, and Boost Overall Health
4 weeks ago 00:17:22 6
Best Workbench for Tiny Workshops
4 weeks ago 00:54:25 1
Boost energy and reduce cravings with these hacks | Glucose Goddess Jessie Inchauspé & Tim Spector
4 weeks ago 00:14:08 7
I use Drag and Drop to build modern Python Apps
4 weeks ago 00:17:51 18
How to Make a Multi Purpose Leather Bag | Hybrid Leather Bag PDF PATTERN
1 month ago 00:05:09 56
Persian Yoga (Pahlavani) - The way of Warriors
1 month ago 00:26:46 1
Gradient Boost Part 2 (of 4): Regression Details
1 month ago 00:04:50 1
How to Buy Your Hostinger Hosting with 91% Discount Coupon Code NOW!
1 month ago 00:02:59 1
RCR | Team Solstice | Terracool: A revolutionary terracotta based comprehensive cooling solution
1 month ago 00:23:18 1
The Effect of Access Bars on Anxiety & Depression - with Dr. Dain Heer & Dr. Terrie Hope