我试图弄清楚这些函数是如何在彼此内部调用的。有人能告诉我他们是如何运行的吗?是否先调用七(),然后调用五()?
function expression(number, operation){
if(!operation)
return number;
return operation(number);
}
function five(operation) { return expression(5, operation); }
function seven(operation) { return expression(7, operation); }
function times(x) {
return function(y) {
return y * x;
}
}
seven(times(five())); // must return 35
慕无忌1623718
相关分类