javascript(JS) Sleep 功能

javascript(JS) Sleep 功能

javascript(JS) Sleep 功能


資料來源: https://stackoverflow.com/questions/18254168/javascript-timeout-sleep-using-settimeout

https://www.codegrepper.com/code-examples/python/javascript+wait+1+second


code:

setTimeout(function(){
  //put your code in here to be delayed by 2 seconds
},2000);
setTimeout(function(){ 
    console.log("Ready");
}, 1000);

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *