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

Combining functions - JavaScript Tutorial

From the course: Learning Functional Programming with JavaScript ES6+

Start my 1-month free trial

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…

Contents