this的指向由调用时决定而不是定义时决定,定义的方式: //直接定义在函数里 var a="window中的a"; var name="window"; function aa(args1,args2){ console.log(this.a+args1+args2); } aa(); //this=window //定义在对象中 var o={ a:"o中的aaa", name:"nicole", print:functi…
Function对象(apply.call.bind) 原创文章,转摘请注明出处:苏福:http://www.cnblogs.com/susufufu/p/5850180.html 本文参考MDN做的详细整理,方便大家参考[MDN](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript) Function 构造器会创建一个新的 Function 对象. 在 JavaScript 中每个函数都是一个Function对象. 构造器 new F…
HDU 2778 Description LCR is a simple game for three or more players. Each player starts with three chips and the object is to be the last person to have any chips. Starting with Player 1, each person rolls a set of three dice. Each die has six faces…