---
title: "Discussion on \"set Timeout() and clearTimeout() in JavaScript\" | Hashnode"
description: "Discussion on \"set Timeout() and clearTimeout() in JavaScript\". The setTimeout() method executes a block of code after the specified time. The method executes the code only once.\nsyntax- setTimeout(function, milliseconds);\nThe setTimeout()method returns an intervalID , which is a positive integer\nfunction greet()..."
url: "https://hashnode.com/posts/set-timeout-and-cleartimeout-in-javascript/64c5f8a08ec9f969146fa09a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [set Timeout() and clearTimeout() in JavaScript](https://mohitstag.hashnode.dev/set-timeout-and-cleartimeout-in-javascript?utm_source=hashnode&utm_medium=feed)

The setTimeout() method executes a block of code after the specified time. The method executes the code only once. syntax- setTimeout(function, milliseconds); The setTimeout()method returns an intervalID , which is a positive integer function greet()...

Jul 30, 2023 · 1 min read · mohitstag.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#asynchronous-javascript](https://hashnode.com/tag/asynchronous-javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)

## Written by

[Mohit Sain](https://hashnode.com/@mohit8302)

@mohit8302

  
[View profile](https://hashnode.com/@mohit8302)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
