
Explore functional programming in JavaScript by dissecting core concepts, applying techniques today, and building from side effects and avoiding mutable data to function composition and declarative programming.
Discover how functional programming in JavaScript emphasizes pure functions, avoids shared state and side effects, and uses declarative code and function composition.
Explore how pure functions avoid side effects to make JavaScript code predictable, debuggable, and easier to reason about, by depending on input and returning consistent outputs.
Practice turning impure code into pure functions by updating a users array with score and tries while avoiding side effects, and explore functional patterns in JavaScript.
Apply functional programming in JavaScript by building pure functions to get and update score and tries, using immutable data, and recording results with a modular, testable workflow.
Explore why follow up solutions to exercise one produce side effects in JavaScript. Reinforce pure functions and avoiding side effects by examining updates to arrays and objects passed by reference.
Explore applying Array.find to replace loops in a JavaScript exercise, making code more declarative and functional by matching objects by name (case-insensitive) and returning score and tries.
learn to manage state in JavaScript by avoiding shared state and mutable data, passing state through pure functions, and cloning objects to prevent unintended updates.
Explore why functional programming aims for immutability and how const doesn't prevent object mutations; apply freezing and cloning techniques to avoid mutating data when sorting arrays.
Learn how to clone objects in JavaScript to avoid mutation using Object.assign and JSON.stringify/parse for deep cloning, with a focus on immutable data in functional programming.
Practice avoiding mutations in JavaScript by modifying exercise two A and two B to ensure changes don’t affect the original array, and produce fresh arrays that track the updates.
Learn how to prevent mutation in JavaScript objects by cloning with a deep clone function (JSON.stringify/parse), using const, and cloning before updates to scores and tries.
Explore reduce, map, and filter as core JavaScript functional tools for arrays. Learn how higher-order functions avoid mutation and return new values via an initial accumulator.
Practice with map, filter, and reduce on a scores array to transform values below ten by ten, filter out over 100 and zero or below, sum and count with reduce.
Practice finishing exercise 3 by using map, filter, and reduce on a scores array. Boost single digits, filter over 100, remove zeros, then compute sum and count.
Apply map to refactor the code and use reduce to retrieve the correct object, returning a new array from the store user function without mutating data.
Demonstrates using map to update a user in a new array and reduce to locate a target object, while normalizing data and avoiding mutation for functional JavaScript.
Explore why update score and update tries are not pure, discuss mutating input, and show cloning to return new data, then preview making them pure in exercise nine with libraries.
Explore how function composition combines simple, pure functions to build reusable solutions, turning inputs into outputs and improving readability and modularity in JavaScript.
Master arrow functions and see how they differ from regular functions, with concise syntax and automatic return. Recognize they are expressions, not declarations, and use parentheses according to parameter count.
Practice arrow functions in map, filter, and reduce; convert two callback functions to single-line arrows, using regular functions only for multiple statements.
Convert existing functions to arrow functions to embrace functional programming in JavaScript, using fat arrows, single-parameter simplifications, two-variable handling, predicates, and reduce patterns.
Learn function composition in JavaScript by building a pipeline that trims, removes punctuation, splits into words, filters articles, and reduces to a final array; compare compose and pipe.
Practice function composition in JavaScript by turning map, filter, and reduce into array-agnostic functions, then compose them to remove zeros and below, remove scores above 100, and compute the average.
Apply functional programming in JavaScript by turning statements into reusable array functions, using pipe to remove high and low scores, multiply by ten, and compute the average with reduce.
Explore how arity affects function composition. Learn how partial application and currying enable pipe-based updates to a user object by binding arguments.
Explore arity, partial application, and currying via higher-order functions and closure in JavaScript. See how an outer function returns an inner one, forming a unary function through closure.
Explore currying and partial application in depth, learn how currying converts multi-argument functions into unary ones for function composition with pipe, and discover their advantages and differences.
Explore how the curry function works, including arity, closure, and currying that accumulate arguments with prev args, next arg, and the spread operator, illustrated by practical JavaScript examples.
Explore currying and composition by building a curried get user function for the user array. Compose a specialized function that updates Henry's score and tries, returning a new array.
Practice functional programming in JavaScript by building curried functions using pipe to operate on a users array—retrieve and clone a user, update Henry’s score and tries, and store the result.
Explore the difference between imperative and declarative programming, showing how JavaScript functional style uses reduce and pure functions to express what to do and promote reusable code.
Review your final code from recent exercises to identify why it is more declarative, and reflect before the follow-up discussion about the declarative approach.
See how code becomes more declarative using map, reduce, and function composition, with currying and pipelines that prepare scores, compute average, and filter high, low, and zero scores.
Compare a JavaScript OOP prototype approach with a functional programming solution that tracks a user's questions and displays the score on an HTML page. Showcasing pure vs impure functions.
Break larger tasks into smaller tasks with intention revealing names, compose them to solve problems, use pure functions when possible, while recognizing imperative parts when necessary.
Learn to set up and use lodash for functional programming in JavaScript, focusing on lodash fp, auto currying, and composing map, filter, and reduce.
Explore Lodash-powered functional programming by converting array operations, namely map and filter, into reusable functions, compose them to remove zero or lower scores and scores over 100, and compute average.
Learn to transform score arrays with lodash by mapping and filtering, composing with pipe and curry, and finally compute the average using a curried mean.
Explore Ramda, a functional JavaScript library, highlighting immutable, side-effect-free, auto-curried functions and data-last design, with examples of map, filter, reduce, and pipe.
Refactor the existing array of users with the Ramda library to update scores and tries, making functions pure by avoiding input mutation and using curry and pipe.
Refactor a JavaScript project with Ramda, linking via CDN, converting mutating code to pure functions, and applying pipe, curry, clone, map, reduce, and update score and tries.
Learn how recursion replaces loops by defining a function that calls itself to solve problems like factorial, using the recursive case and base case, and observe stack unwinding in JavaScript.
Are you wanting to learn how to apply functional programming in JavaScript? Have the concepts been a bit difficult to grasp? Are you not quite sure how functional programming differs from other approaches used in JavaScript? If so, this course is for you!
The functional programming paradigm was difficult, at first, for me to grasp and implement. Therefore, I wanted to create a course that would help others make the leap and begin applying functional programming techniques into their own code. In this course you will learn techniques that you can apply today. But remember, you don't need to implement everything immediately. Implement those things that make sense and grow into it slowly.
In this course I have taken the approach of dissecting a technical definition of functional programming and using that definition as the structure of the course. We will break it down into pieces. Focus on those pieces and the techniques you can use right away. Each new concept will build on the previous concepts. And in the end you will see all the concepts come together.
If you learn by doing, this course gives you plenty of chances to work on exercises and then sit back and watch as I go through the exercise. By doing and then watching my approach, you will learn how to apply functional programming concepts to JavaScript.
Jump in today and begin learning a different way of using JavaScript!