在比较运算符两边的“数”用立即调用函数代替
示例
var hasPassed = (function () { var pass = 50; var psss = 2; return pass * psss; }()) >= (function () { var score = 90; return score; }()) document.write(hasPassed)
在比较运算符两边的“数”用立即调用函数代替
示例
var hasPassed = (function () { var pass = 50; var psss = 2; return pass * psss; }()) >= (function () { var score = 90; return score; }()) document.write(hasPassed)