Within this Video Mike speaks about Functional Programming in JavaScript.
JavaScript is a multi-paradigm language with rich functional programming capabilities. Functional programming does not have to be difficult or hugely theoretical. Quite the opposite – it can help you to solve the most common programming challenges in a more concise and elegant fashion.
In this video we focus on working with arrays in JavaScript. Normally, when dealing with arrays a developer would write a for
loop and mutate a variable or two. However, JavaScript already comes with functions, such as, every()
, filter()
, map()
, reduce()
, etc. that help you to write better code for array operations.
We also demonstrate how you can combine those functions together in order to encapsulate complex data operations . We analyse performance of some operations and show how certain issues can be solved by using 3rd party libraries, such as lazy.js
and Immutable-JS
.
Finally, we illustrate how functional programming can become only better in EcmaScript 6.