Preface

At times, JavaScript can be a frustrating programming language to work with. Just when you think you have it entirely figured out, performance or cross-browser issues reveal themselves in the worst possible way. Lo-Dash is just one of many libraries that aim to help JavaScript programmers write code that's elegant, efficient, and portable. Underscore.js introduced a better way to perform functional programming with JavaScript. Lo-Dash is a continuation of this effort, and throughout this book, we'll see what sets Lo-Dash apart from other libraries out there, including Underscore.

At its heart, JavaScript is a functional language, but not necessarily a pure functional language—you can modify variables and introduce side effects. However, functions are first-class citizens and you can do a lot with them. Lo-Dash embraces this idea and gives programmers all the tools they need to write functional code that's readable and maintainable. All the cool things you can do with higher-order functions in other languages are possible with Lo-Dash as well.

It's not just the low-level utilities and performance gains that Lo-Dash delivers, though these are always welcome; it's also the enhanced programming model and the ideas that Lo-Dash borrows from other languages such as functional and applicative programming. These are imparted to JavaScript applications as a coherent API. Underscore got the ball rolling, and Lo-Dash further enhances these ideas, albeit using different design and implementation strategies.