+ 2

Hi guys am kinda new to JavaScript please how do i set timeout using function

Javascript

4th Dec 2019, 5:45 AM
Attah Israel
Attah Israel - avatar
3 ответов
+ 3
setTimeout(myFunc, 1000); function myFunc(){ alert(“A second has gone by”) } The basic idea is that it take 2 parameters. It takes a function, then how many milliseconds until that function is called (1000 milliseconds per second)
4th Dec 2019, 5:54 AM
Jax
Jax - avatar
+ 3
As Jax said, or you can do this way too: setTimeout(function(){ //your js },1000)
4th Dec 2019, 6:16 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
- 2
dio cane!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5th Dec 2019, 8:26 AM
Thulean Perspective
Thulean Perspective - avatar