0

Javascript Wait Var

This code does not work: var wait = 3000 sleep(wait); document.write("it has been 3 seconds")

9th Jun 2017, 5:16 PM
BGMead
BGMead - avatar
4 ответов
+ 12
var wait = 3000 setTimeout(function(){ document.write("it has been 3 seconds")},wait);
9th Jun 2017, 5:17 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
var wait = false if (wait = false) { wait = true; setInterval(function(){ document.write("it has been 3 seconds"); wait = false;},3000); }
9th Jun 2017, 7:14 PM
Russel Reeder
Russel Reeder - avatar
+ 2
setTimeout(function(){ document.write('it has been 3 seconds'); }, 3000);
9th Jun 2017, 5:18 PM
Schindlabua
Schindlabua - avatar
0
None of these work
9th Jun 2017, 5:31 PM
BGMead
BGMead - avatar