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 I 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. .
I 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, I illustrate how functional programming can become only better in EcmaScript 6.
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. My personal thoughts tend to change, hence the articles in this blog might not provide an accurate reflection of my present standpoint.
© Mike Borozdin