题解 | #修改 this 指向#

修改 this 指向

http://www.nowcoder.com/practice/a616b3de81b948fda9a92db7e86bd171

function bindThis(f, oTarget) { //法1 f.bind(oTarget); //法2 return function(){ return f.call(oTarget,...arguments) } //法3 return function(){ return f.call(oTarget,arguments) } }

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务