setTimeout() method inside a while loop

前端 未结 6 1958
余生分开走
余生分开走 2020-12-09 19:54

I have read the relevant pages on w3schools and other similar questions here but cannot seem to understand what\'s wrong about the following bit :

var myfunc         


        
6条回答
  •  一个人的身影
    2020-12-09 20:07

    • I think you are missing a semicolon on the setTimeout and you should try passing the arguments in the below fashion:

      setTimeout(myfunc03, 1000*i, i); 
      

提交回复
热议问题