---
title: "Discussion on \"How to make your Javascript Functions sleep?\" | Hashnode"
description: "Discussion on \"How to make your Javascript Functions sleep?\". We may encounter some scenarios where we have to pause the execution of a function for some fixed amount of time.\nMany programming languages already have a built-in sleep method available.To halt a program for 2 seconds, we've got the following imple..."
url: "https://hashnode.com/posts/how-to-make-your-javascript-functions-sleep/622a0c0be552e99d82e58a92"
---

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

Discussion

# [How to make your Javascript Functions sleep?](https://shivaansh.hashnode.dev/how-to-make-your-javascript-functions-sleep?utm_source=hashnode&utm_medium=feed)

We may encounter some scenarios where we have to pause the execution of a function for some fixed amount of time. Many programming languages already have a built-in sleep method available.To halt a program for 2 seconds, we've got the following imple...

Mar 10, 2022 · 2 min read · shivaansh.hashnode.dev  
Read the article

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

## Written by

[Shivaansh Agarwal](https://hashnode.com/@shivaansh)

@shivaansh · India

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

Frontend Software Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
