Why 'setInterval' behaves differently in object and function

前端 未结 0 1612
执笔经年
执笔经年 2021-01-12 11:51

When I define setInterval in the object. After executing in the browser, it will be output \'Alert!\' immediately.

var obj={
    a: setTimeout(function(){cons         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题