摘要: 1 var x = 1; 2 var obj = { 3 x: 2, 4 dbl: function () { 5 this.x *= 2; 6 x *= 2; 7 console.log(' ') 8 console.log(x); 9 console.log(this.x); 10 } 11 } 阅读全文
posted @ 2020-02-20 23:05 xfcao 阅读(930) 评论(0) 推荐(1) 编辑
摘要: 函数组合运行 说明:实现一个方法,可将多个函数方法按从左到右的方式组合运行。 如composeFunctions(fn1,fn2,fn3,fn4)等价于fn4(fn3(fn2(fn1))。 1 const add = x => x + 1; 2 const multiply = (x, y) => 阅读全文
posted @ 2020-02-20 23:03 xfcao 阅读(517) 评论(0) 推荐(0) 编辑