Chapter 2. Higher-order JavaScript

 

This chapter covers

  • Why JavaScript is a suitable functional language
  • JavaScript as a language that enables multiparadigm development
  • Immutability and policies for change
  • Understanding higher-order and first-class functions
  • Exploring the concepts of closures and scopes
  • Practical use of closures

Natural language has no dominant paradigm, and neither does JavaScript. Developers can select from a grab bag of approaches—procedural, functional, and object-oriented—and blend them as appropriate.

Angus Croll, If Hemingway Wrote JavaScript

As applications get bigger, so does their complexity. No matter how good you think you are, turmoil is unavoidable if you don’t have the proper programming models in place. In chapter 1, I explained the reasons functional programming is a compelling paradigm to adopt. But paradigms by themselves are just programming models that need the right host language to come to life.

2.1. Why JavaScript?

 
 
 
 

2.2. Functional vs. object-oriented programming

 
 
 

2.3. Functions

 
 

2.4. Closures and scopes

 
 
 
 

2.5. Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest