摘要: 1.概念 能够读取其它函数作用域里变量的函数 2.应用 // 2.1累加器 function hd(){ let n = 0 return ()=>{ console.log(++n) } } const sum = hd() sum() sum() // 2.2类 function Hd(){ t 阅读全文
posted @ 2021-08-29 11:03 卷叶小树 阅读(29) 评论(0) 推荐(0) 编辑