---
title: "Discussion on \"Trust issues with setTimeout()\" | Hashnode"
description: "Discussion on \"Trust issues with setTimeout()\". If you have written js code for sometime then you have definitely come across something called \"setTimeout()\". It's quite a simple function, takes in a callback function as it's first argument and a duration as it's second. It then executes said call..."
url: "https://hashnode.com/posts/trust-issues-with-settimeout/6287c61989168247f55efc16"
---

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

Discussion

# [Trust issues with setTimeout()](https://tanveersblog.hashnode.dev/trust-issues-with-settimeout?utm_source=hashnode&utm_medium=feed)

If you have written js code for sometime then you have definitely come across something called "setTimeout()". It's quite a simple function, takes in a callback function as it's first argument and a duration as it's second. It then executes said call...

May 20, 2022 · 5 min read · tanveersblog.hashnode.dev  
Read the article

-   [#vanilla-js-1](https://hashnode.com/tag/vanilla-js-1)
-   [#event-loop](https://hashnode.com/tag/event-loop)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#v8](https://hashnode.com/tag/v8)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Tanveer Hazarika](https://hashnode.com/@tanveerhazarika)

@tanveerhazarika

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

Android dev venturing into full stack development.

## Responses 2

Markdown supported · ⌘↵ to post

[Shrinkhla Rajpoot](https://hashnode.com/@Shrinkhla)

[Jun 6, 2022](https://hashnode.com/posts/trust-issues-with-settimeout/6287c61989168247f55efc16/comment/629e799da6bfa05457952ff0)

Well written

[Carlonn Rivers](https://hashnode.com/@Danidre)

[May 20, 2022](https://hashnode.com/posts/trust-issues-with-settimeout/6287c61989168247f55efc16/comment/6287f90c9490454c4d846f23)

Definitely trust issues. It took a while for me to get used to this. There are even more trust issues with `setInterval()` being inconsistent when the tab isn't focused, so I try to stay away from it as much as possible.

[Tanveer Hazarika](https://hashnode.com/@tanveerhazarika)

[May 21, 2022](https://hashnode.com/posts/trust-issues-with-settimeout/6287c61989168247f55efc16/comment/6287f90c9490454c4d846f23#reply-62889ba59490454c4d847bd8)

The change in behavior with changing tabs seem like something interesting to look into!
