Skip to Content
Mastering JavaScript Functional Programming - Second Edition
book

Mastering JavaScript Functional Programming - Second Edition

by Federico Kereki
January 2020
Intermediate to advanced
470 pages
11h 13m
English
Packt Publishing
Content preview from Mastering JavaScript Functional Programming - Second Edition

Summary

In this chapter, we started working with higher-order functions in order to show a more declarative way of working, with shorter, more expressive code. We went over several operations: we used .reduce() and .reduceRight() to get a single result from an array, .map() to apply a function to each element of an array, .forEach() to simplify looping, flat() and flatMap() to work with arrays of arrays, .filter() to pick elements from an array, .find() and .findIndex() to search in the arrays, and .every() and .some() to verify general logic conditions. Furthermore, we considered some unexpected situations that happen when you deal with async functions and we wrote special functions for those cases.

In Chapter 6, Producing Functions – Higher-Order ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering JavaScript Functional Programming

Mastering JavaScript Functional Programming

Federico Kereki

Publisher Resources

ISBN: 9781839213069Supplemental Content