Calling functions with setTimeout()

后端 未结 6 1457
谎友^
谎友^ 2020-11-21 06:49

Simply put...

why does

setTimeout(\'playNote(\'+currentaudio.id+\', \'+noteTime+\')\', delay);

work perfectly, calling the function

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-21 07:32

    Because the second one you're telling it to call the playNote function first and then pass the return value from it to setTimeout.

提交回复
热议问题