From the course: Learning Functional Programming with JavaScript ES6+
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Combining functions - JavaScript Tutorial
From the course: Learning Functional Programming with JavaScript ES6+
Combining functions
- [Instructor] So far we've seen several of JavaScript's numerous built-in array functions, their syntax and some examples of how they might be used in a code base. These functions are certainly very powerful on their own, and each contributes a great deal towards simplifying and increasing readability in our code. The really exciting part, however, is that these functions can all be combined to give us an incredible amount of functionality. In this video we're going to walk through an example of how we can do this. The example we're going to look at is this. Let's say we have an array of employee data, each with name, age, job title and salary attributes. Now there's all sorts of interesting information that can be deduced from a data set like this and we're going to examine a few ways that we can discover this information using the built-in array functions we've learned. What we're going to do is calculate how the average salary of the developers in our data set compares to the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
JavaScript: Functional parts1m 53s
-
(Locked)
The spread operator5m 30s
-
Mapping5m 11s
-
(Locked)
Filtering6m 59s
-
(Locked)
Every/some5m 46s
-
(Locked)
Slicing3m 38s
-
(Locked)
Sorting5m 11s
-
(Locked)
Reducing6m 23s
-
(Locked)
Combining functions6m 40s
-
(Locked)
Challenge: Recreate the map function1m 3s
-
(Locked)
Solution: Recreate the map function3m 6s
-
(Locked)
-
-
-