var getarticles = function(subject){
console.log("found your articles about: " + subject);
}
var rl = rl || {};
rl.utils = (function () {
var callApadter = function(adapter){
setTimeout(function() {
console.log("inside the first timeout");
adapter
}, 4000);
};
return{
callApadter: callApadter
}})();
rl.utils.callApadter(getarticles("JS"));
setTimeout(function() {
console.log("this is 4 seconds");
}, 4000);
谁能告诉我为什么 getarticles 会立即被调用?
多谢你们。