- [Instructor] I mentioned in a previous video … that functional programming treats … functions as first class citizens, … meaning that we can treat functions … in a very similar way to other types … such as strings, numbers or objects. … In this video, we're going to take a look … at what this means for our code, … and a few useful things that we can do with it. … Let's start off with a simple example. … We'll create a function, we'll call it sayHello, … const sayHello, and all this function will do … is print the word Hello to the console. … Equals parentheses, … arrow console dot log Hello. … What we can do now is define another function … we'll call it sayHello2 … and set it equal to our function sayHello. … Const sayHello2 equals sayHello. … We can then call our sayHello2 function … in the same way that we can call sayHello, … just by adding parentheses to the end like this. … This is true also when we add arguments to our function, … for example, if we add a name argument … to our sayHello function like this. …
- The goal of functional programming
- Declarative vs. imperative programming
- Ensuring immutability
- Arrow functions in ES6
- Passing functions as arguments
- Mapping, filtering, slicing, sorting, and reducing
- Advanced functional concepts, including recursion
Skill Level Intermediate
1. Introductory Functional Concepts
2. First-Class Functions
4. Advanced Functional Concepts
5. Code Conversion Challenges
Next steps1m 10s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.