复制1var bar = function(){ 2 console.log(this.x); 3} 4var foo = { 5 x:3 6} 7var sed = { 8 x:4 9} 10var func = bar.bind(foo).bind(sed); 11func(); //? 12 13var fiv = { 14 x:5 15} 16var func = bar.bind(foo).bind(sed).bind(fiv); 17func(); //?
1var bar = function(){ 2 console.log(this.x); 3} 4var foo = { 5 x:3 6} 7var sed = { 8 x:4 9} 10var func = bar.bind(foo).bind(sed); 11func(); //? 12 13var fiv = { 14 x:5 15} 16var func = bar.bind(foo).bind(sed).bind(fiv); 17func(); //?
题库维护不易,您的支持就是我们最大的动力!