下面的代码... 写了两份:
test = ->
console.log (typeof $.ajax)
console.log (typeof $('body').find)
ttest = setInterval test, 1000
test = function() {
console.log(typeof $.ajax);
return console.log(typeof $('body').find);
};
ttest = setInterval(test, 1000);
Firefox 下持续输出 undefined
, Chrome 下持续输出 function
, 这是为什么?