Plato on Github
Report Home
src/arrow.js
Maintainability
89.64
Lines of code
19
Difficulty
11.70
Estimated Errors
0.18
Function weight
By Complexity
By SLOC
(function() { 'use strict'; const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; const isGreatherThan = pivot => n => n > pivot; const isEven = (n) => n % 2 === 0; const sqrtLessThan = pivot => n => Math.sqrt(n) < pivot; const double = n => n * 2; const add = (a, b) => a + b; console.log( numbers.filter(isEven) .filter(isGreatherThan(3)) .filter(sqrtLessThan(3)) .map(double) .reduce(add) ); })();