Closed DevilRoshan closed 4 years ago
出自小程序前端面试星球
// 以下代码输出 function getName(){ for(let i = 0; i < 5; i++){ setTimeout(function(){ console.log(i) }, i * 1000) } return { name: 'XXX' } } console.log(getName())
https://github.com/DevilRoshan/Question/blob/master/20200812-js-code-return.md