Jump to ratings and reviews
Rate this book

Functional JavaScript: Introducing Functional Programming with Underscore.js

Rate this book
How can you overcome JavaScript language oddities and unsafe features? With this book, you’ll learn how to create code that’s beautiful, safe, and simple to understand and test by using JavaScript’s functional programming support. Author Michael Fogus shows you how to apply functional-style concepts with Underscore.js, a JavaScript library that facilitates functional programming techniques. Sample code is available on GitHub at

Fogus helps you think in a functional way to help you minimize complexity in the programs you build. If you’re a JavaScript programmer hoping to learn functional programming techniques, or a functional programmer looking to learn JavaScript, this book is the ideal introduction.

Use applicative programming techniques with first-class functionsUnderstand how and why you might leverage variable scoping and closuresDelve into higher-order functions—and learn how they take other functions as arguments for maximum advantageExplore ways to compose new functions from existing functionsGet around JavaScript’s limitations for using recursive functionsReduce, hide, or eliminate the footprint of state change in your programsPractice flow-based programming with chains and functional pipelinesDiscover how to code without using classes

262 pages, Kindle Edition

First published January 1, 2013

81 people are currently reading
861 people want to read

About the author

Michael Fogus

8 books593 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
153 (35%)
4 stars
177 (41%)
3 stars
78 (18%)
2 stars
19 (4%)
1 star
2 (<1%)
Displaying 1 - 24 of 24 reviews
25 reviews18 followers
September 14, 2018
Loving it. Reading just a few pages makes you better Javascript developer
Profile Image for Bjoern Rochel.
398 reviews83 followers
January 4, 2015
It's interesting to see functional programming concepts through the lens of JavaScript. The book does a good job of explaining the fundamentals in a clear, concise and hands-on way.

I also like that it's pragmatic and advocates using the right abstraction for the problem at hand, which dependent on the problem can also mean an object-oriented approach. That's how I currently mostly value functional programming, as an additional tool/technique on my tool-belt, rather than something that replaces most of it.

Since I've already spend some time in F# and Clojure the book was more of an refresher to me. I think it is a good starting point though if you're interested in functional programming before you actually go on and read a book on F#, Haskell, Clojure, et al.
Profile Image for Veselin Nikolov.
731 reviews87 followers
January 11, 2015
It is a strange book. The author is building a functional framework, by using Underscore and jQuery. He explains some design patterns and concepts that you might need, and many that you wouldn't.

The book is very good in convincing the reader that the fully functional approach in JS is not practical. It's also convincing that immutability is the root of all evil. How so, if the author says the opposite? Many of the examples are far from the real world, hard to understand, and the explanations are full of terminology. You can assume that if you do that to a real project, you might be the only one understanding it. Willing to take the risk?
Profile Image for Aaron Schumacher.
203 reviews11 followers
January 19, 2022
Functional Javascript is impressively good. Though Javascript throughout, it helped me to start using decorators in Python more effectively. There are a lot of good ideas in there.

The author, Michael Fogus, is also an author of The Joy of Clojure, which greatly simplified my search for a Clojure book to read.
Profile Image for Jorge David.
37 reviews
April 16, 2013
I honestly wish more books were written in this manner. Very straightforward and enlightening. Might take longer to understand because of it's simplicity and lack of over-explanation, but when you do understand it is very eye opening. 5 stars is not enough.
Profile Image for Jake McCrary.
424 reviews25 followers
July 4, 2013
This is a really solid book on functional programming in JavaScript. Examples are in JavaScript but ideas can be easily taken to other languages. I don't write much JavaScript but I'm still glad I've read this book.
Profile Image for VanessaRC.
39 reviews
August 22, 2019
It's a great book that goes in depth into the concepts of the topic. If you have time, and it matters to you you should read it. It's difficult not to take anything out of this book into the real work world and make it better. I recommend it.
Profile Image for Juvoni.
98 reviews102 followers
October 6, 2016
A detailed presentation of various functional programming patterns with code examples and context behind the approaches. I would recommend for intermediate to advanced readers or those looking to develop a stronger functional mindset to work with libraries like React or Redux. In Functional programming, functions are first class elements of the language and it decreases complexity by reducing the amount of state changes taking place in your programs; copies of data are instead transformed. I gained a lot of insight into currying, closures, recursion, and other powerful functional concepts.
Profile Image for Marc Udoff.
153 reviews7 followers
January 1, 2016
This was an ok book on functional programming. The author is more concerned with using underscore to write interesting code than anything else. I came away feeling that he could have done a much better job pitching functional programming and why it is better. He brushes over some key facts that leaves his implementation feel super inefficient for many things (despite him saying not to worry about it) and code that I had to logic through much more than if written in procedural/classical styles. Also, it's likely that as a relative newcomer to underscore and functional programming, I lost the beauty because I just don't have the deep level of understanding. Another big program is that modern JS (ES6/ES7) solves many of the problems he is trying to solve by using functional programming, so maybe that's why my impression was what it was. I do strongly believe in using pure functions and other functional paradigms at times, but this book won't instill the why its so great but more how to do it.

Overall, if you had to read about functional programming in JS, this is OK, not terrible not the best. Reading about RxJS or redux might convince you quicker of its value.
6 reviews
July 12, 2013
Fogus tried presenting functional programming concepts in very lucid and straight forward fashion and he is successful in that. Though book uses Underscore.js extensively but has not discussed the same in depth.

If you are new to Functional programming but knows JavaScript, this book is for you. Certainly this book is not for green horns.

Functional JavaScript: Introducing Functional Programming with Underscore.js has dedicated chapters for First-Class Functions, Closures, High-Order Functions, Recursion, etc. Book is dense and packed with information. One need time and patience to read and grasp this book.

Disclaimer: I did not get paid to review this book, and I do not stand to gain anything if you buy the book. I have no relationship with the publisher or the author. I got electronic format of book from publisher for review.

details of review can be find at my blog
Profile Image for Christopher Wilson.
Author 1 book2 followers
July 10, 2013
I'm sometimes asked "what is functional programming" and, as cliched as it may be I'd do my best Morpheus: "Unfortunately, no one can be told what functional programming is. You have to see it for yourself." "Functional Javascript" is the book that lets you "see it for yourself". That the examples are in Javascript is certainly helpful, with JS rapidly becoming a programming lingua franca, but the quality of the examples would stand in another language as well.

I would recommend this to anyone looking to learn about functional programming (whatever the language), and I would make this required reading (if I could) for any JS developer.
Profile Image for Jan Ryswyck.
Author 2 books18 followers
September 10, 2014
This book is a great introduction to functional programming. The author goes to great length explaining the underpinnings of several functional programming paradigms. The topics covered by this book are both language and library agnostic. The author just happened to use JavaScript and Underscore.js to explain things.
130 reviews25 followers
May 19, 2015
It is nice introduction to functional programming (FP), unfortunately I read couple of books from You Don't Know JS (YDKJS) series first. YDKJS doesn't cover FP but this book uses some language features which I would call anti-patterns which I would avoid now.

If I could choose what to read first, whether this book or YDKJS series. I'd say this book.
Profile Image for James Koppen.
29 reviews1 follower
December 3, 2013
Well-written and thorough coverage of functional concepts. Code written in this style (e.g. a recent script I wrote for NaNoGenMO) looks bizarre.
Profile Image for Gary.
195 reviews1 follower
December 31, 2013
A good intro to FP via JS.
I didn't quite like some of his examples (for example, promises using jquery's Deferreds) but it was good.
Profile Image for Richard.
Author 4 books13 followers
October 2, 2013
If the title appeals, read the book: it's useful.
Profile Image for Jon.
174 reviews7 followers
May 30, 2014
Great introduction to functional programming in JavaScript.

It would be nice to see a simple program in the wild using the concepts in this book.
15 reviews1 follower
May 21, 2014
Could be called: trying to implement some clojure features un javascript. Interestung, if somewhat futile.
Profile Image for Jedidiah Hurt.
1 review1 follower
February 14, 2014
Enabled me to finally wrap my head around the functional thought process. This book will represent a pivotal point in my programming career. Also, superbly written.
Profile Image for Joakin.
11 reviews2 followers
April 14, 2014
Cool book with lots of interesting concepts applied to JavaScript. probably a bit too dense for begginers.

Complement it reading JavaScript Allonge
Profile Image for Jeff.
41 reviews
April 27, 2017
Definitely not a deep dive into functional programming. Admirably clear, but disappointing for its limited scope.
Displaying 1 - 24 of 24 reviews

Can't find what you're looking for?

Get help and learn more about the design.