---
title: "Discussion on \"Asynchronous JavaScript – How Web APIs and Promises Work\" | Hashnode"
description: "Discussion on \"Asynchronous JavaScript – How Web APIs and Promises Work\". Why do we need to use the Asynchronous function?\n\nto avoid the block of our main thread, it give bad experience to user if browser is slow\nif the function performs complex code that consumes good time so, to avoid thread block, we need to use  \nAPI h..."
url: "https://hashnode.com/posts/asynchronous-javascript-how-web-apis-and-promises-work/627c0c69983a4ab69ce9e26b"
---

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

Discussion

# [Asynchronous JavaScript – How Web APIs and Promises Work](https://trixoon.hashnode.dev/asynchronous-javascript-how-web-apis-and-promises-work?utm_source=hashnode&utm_medium=feed)

Why do we need to use the Asynchronous function? to avoid the block of our main thread, it give bad experience to user if browser is slow if the function performs complex code that consumes good time so, to avoid thread block, we need to use API h...

May 11, 2022 · 3 min read · trixoon.hashnode.dev  
Read the article

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

## Written by

[Gourav Mishra](https://hashnode.com/@gouravmarch20)

@gouravmarch20

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
