I've been giving JavaScript & CasperJS training sessions lately, and was amazed how few people are aware of the Functional Programming capabilities of JavaScript. Many couldn't see obvious usage of these in Web development, which is a bit of a shame if you ask me.
Let's take things like map and reduce from the Array prototype.
I've been hearing a few times things like: Well yeah that's cool, but I don't do maths, I'm a Web developer.
And each time it turns me a little sad.
As we're programming language hipsters, in this article we'll use ES6 short function syntax which has landed a few weeks ago in Firefox Nightlies and eases a lot writing code in the functional style.
We'll also use other ES6 features as well because, you know, today is our future already.
This article contents will also probably hurt some people feelings, probably because there's a lot to hate in there when you come from a pure OOP landscape. Please think of this article as an exercise of thought instead of yet another new JavaScript tutorial™.
Your new post is loading...