for(i=0;i<10;i++) {
//codes
sleep(500);
}
This code working finely with php , how to write this code with js ? help me please
for(i=0;i<10;i++) {
//codes
sleep(500);
}
This code working finely with php , how to write this code with js ? help me please
You'll have to use the setTimeOut()
function. Here's how the basic usage goes :
setTimeOut(function(){ /*Your code */},500);
Also note that the time is in milliseconds. Here are some more examples to help you.