Use arrow function

Use ES6 arrow function
Update from `+` to `*` to validate results
This commit is contained in:
Bassam Ismail 2015-06-03 14:06:56 +05:30
parent e5fd793982
commit d7c0b1173e

View file

@ -108,9 +108,7 @@ executions with the the same input parameters.
Simplest functor in javascript is an `Array`
```js
[2,3,4].map( function(n) {
return n + 2;
}); // [4,6,8]
[2,3,4].map( n => n * 2 ); // [4,6,8]
```
---