Display Alert box after 10 Seconds using JavaScript setTimeout() Method

The setTimeout method in JavaScript evaluates an expression after specified number of milliseconds and executes only once .

How to display Alert box after 10 Seconds using JavaScript setTimeout() Method

For example , if you want to display an alert message to the user after 10 seconds , you can use the below code snippet.

<script>
setTimeout(function(){alert("Ginktage.com")},10000);
</script>

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply


x

Interesting BlogPosts to read

How to Flatten a 2-D array in JavaScript ?
You can flatten a 2-D array in JavaScript using the concat and apply method as shown in the below co...
How to convert from Degree to Radian in JavaScript ?
Assume that you have an angle in degree and you wish to convert it to radians in JavaScript so that ...
The Rise of the Full Stack JavaScript Developer by @dortzur
JavaScript is everywhere.In the old days, being a JavaScript developer meant that you were a fro...