I have tried to write a wait function but it seems like it will not brake
the while loop. I tried two different solutions.
Can anyone tell me what I am doing wrong, and come with another suggestion?
If I call the function like this: wait(500); it should wait 500ms right?
function wait(time) {
while(1){
setTimeout("bre ak;",time);
}
}
function wait(time) {
var flag=0;
while(flag=0){
setTimeout("fla g=1;",time);
}
}
the while loop. I tried two different solutions.
Can anyone tell me what I am doing wrong, and come with another suggestion?
If I call the function like this: wait(500); it should wait 500ms right?
function wait(time) {
while(1){
setTimeout("bre ak;",time);
}
}
function wait(time) {
var flag=0;
while(flag=0){
setTimeout("fla g=1;",time);
}
}
Comment