摘要:
1 function slow(x) { 2 // 这里可能会有重负载的 CPU 密集型工作 3 alert(`Called with ${x}`); 4 return x; 5 } 6 7 function cachingDecorator(func) { 8 let cache = new Ma 阅读全文
摘要:
Named Function Expression 1 let sayHi=function fname(who) { 2 alert(`hello, ${who}`); 3 }; 1 let sayHi = function fname(who) { 2 if (who) { 3 alert(`H 阅读全文