Code to go logo
Created using Figma
Use Cases
Contribute
How to set timeout in JavaScript
Functions
By Jad Joubran ·
Last updated Nov 05, 2018
setTimeout(() => { console.log("I am called after 5 seconds"); }, 5000);
I am called after 5 seconds
Nov 05, 2018
1
Jad Joubran
See answer
1
Jad Joubran
Window.setTimeout
on MDN
Learn JavaScript step by step