---
title: "Discussion on \"JavaScript interval vs timeout\" | Hashnode"
description: "Discussion on \"JavaScript interval vs timeout\". There are two methods for it:\n\nsetTimeout allows us to run a function once after the interval of time.\nsetInterval allows us to run a function repeatedly."
url: "https://hashnode.com/posts/javascript-interval-vs-timeout/664f27e20a7a9938def88fa1"
---

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

Discussion

# [JavaScript interval vs timeout](https://codenuggets.hashnode.dev/javascript-interval-vs-timeout?utm_source=hashnode&utm_medium=feed)

There are two methods for it: setTimeout allows us to run a function once after the interval of time. setInterval allows us to run a function repeatedly.

May 23, 2024 · 3 min read · codenuggets.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#scheduler](https://hashnode.com/tag/scheduler)
-   [#learning](https://hashnode.com/tag/learning)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)
-   [#code](https://hashnode.com/tag/code)

## Written by

[ismail abu almagd](https://hashnode.com/@IsmailAbualmagd)

@IsmailAbualmagd · egypt

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

Software developer

A software developer who found his passion in building successful saas and learn from the journey.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
