Table of Contents
Preface
1
Becoming Functional – Several Questions
What is functional programming?
Theory versus practice
A different way of thinking
FP and other programming paradigms
What FP is not
Why use FP?
What we need
What we get
Not all is gold
Is JavaScript functional?
JavaScript as a tool
Going functional with JavaScript
Key features of JavaScript
How do we work with JavaScript?
Using transpilers
Working online
A step further – TypeScript
Testing
Summary
Questions
2
Thinking Functionally – A First Example
Our problem – doing something only once
Solution 1 – hoping for the best!
Solution 2 – using a global flag
Solution 3 – removing the handler
Solution 4 – changing the handler
Solution 5 – disabling the button
Solution 6 – redefining ...
Get Mastering JavaScript Functional Programming - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.