题目
有以下函数,这3个函数中哪个能够访问外部范围变量?
clickHandler,immediate和delayedReload:
let countClicks = 0;
button.addEventListener('click', function clickHandler() {
countClicks++;
});
const result = (function immediate(number) {
const message = `number is: ${number}`;
return message;
})(100);
setTimeout(function delayedReload() {
location.reload();
}, 1000);
帖子还没人回复快来抢沙发