参考地址,详细说明,以下为个人总结 function add (num){ function fn(nextnum){ num += nextnum; return fn; } fn.valueOf = function