考察知识点:闭包
<script>
setInterval(fn(123),1000)
function fn (data) {
return function() {
console.log(data);
}
}
</script>
考察知识点:闭包
<script>
setInterval(fn(123),1000)
function fn (data) {
return function() {
console.log(data);
}
}
</script>