Let's get functional
This chapter discusses some basic ways to help you get started on functional programming. Procedural and object-oriented programming are about writing programs that specify the steps required to achieve a goal. Functional programming is about declaring the goal you want to achieve. The procedural vs declarative difference is not the only principle that separates functional programming from other ways to program. However, the above difference is sufficient to know for now to help you get started on writing functional JavaScript code. See this article for an introduction to basic principles of functional programming. This blog and this book discuss functional programming in more depth, specifically using JavaScript.