高阶函数

 1 function not(f){
 2                 return function(){
 3                     var result = f.apply(this,arguments);
 4                     return !result;
 5                 }
 6             }
 7             var even = function(x){
 8                 return x%2 === 0;
 9             }
10             var odd = not(even);
11             console.log([1,3,5].every(odd))
原文地址:https://www.cnblogs.com/fanhc/p/3255028.html