1 var TEST = { 2 msg: 'test', 3 ping: function() { 4 return this.msg 5 }.bind(this /* this -> window */) 6 }
1 var TEST = { 2 msg: 'test', 3 ping: function() { 4 return this.msg 5 }.bind(this /* this -> window */) 6 }
转载于:https://www.cnblogs.com/chris-oil/p/7681858.html