---
title: "Discussion on \"Difference Between setTimeout and setInterval\" | Hashnode"
description: "Discussion on \"Difference Between setTimeout and setInterval\". setTimeout and setInterval are both JavaScript functions that can be used to schedule code to be executed after a certain period of time. The main difference between the two is how they behave:\n\nsetTimeout is a one-time function that executes a piece..."
url: "https://hashnode.com/posts/difference-between-settimeout-and-setinterval/63d7b5db6a29d3450a1f0e7c"
---

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

Discussion

# [Difference Between setTimeout and setInterval](https://lets-do-this.hashnode.dev/difference-between-settimeout-and-setinterval?utm_source=hashnode&utm_medium=feed)

setTimeout and setInterval are both JavaScript functions that can be used to schedule code to be executed after a certain period of time. The main difference between the two is how they behave: setTimeout is a one-time function that executes a piece...

Jan 30, 2023 · 1 min read · lets-do-this.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#functions](https://hashnode.com/tag/functions)
-   [#javascript-functions](https://hashnode.com/tag/javascript-functions)

## Written by

[Akhil rathipelly](https://hashnode.com/@rathipellyakhil07)

@rathipellyakhil07 · hyderabad

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

Fullstack developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
