0

How can i create an alert which comes in 3 seconds and not instant

How can i create an alert which comes in 3 seconds and not instant ... like setInterval ( alert, 3000) But only one time and not all 3 secs. ... :c https://code.sololearn.com/WV3e58cDWSLI/?ref=app

24th Dec 2017, 8:21 PM
Michelle Becker
Michelle Becker - avatar
2 odpowiedzi
+ 3
use the setTimeout() method, the sameway you would use setInterval(). It will execute the code one time, instead of repeating it every 3 secs ;)
24th Dec 2017, 8:54 PM
Welliton Malta
Welliton Malta - avatar
+ 1
Cool Thanks
25th Dec 2017, 5:10 AM
Michelle Becker
Michelle Becker - avatar