---
title: "Discussion on \"Mastering JavaScript: From Sync to Async and Beyond\" | Hashnode"
description: "Discussion on \"Mastering JavaScript: From Sync to Async and Beyond\". How JS executes the code?\nJavaScript execution involves two main stages: creation and execution. These stages are managed within special environments called execution contexts.\n1. Creation Phase (Setting Up the Stage)\n\nGlobal Execution Context (GEC):..."
url: "https://hashnode.com/posts/javascript-promise-explained/669b87b9145d28f00090ab28"
---

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

Discussion

# [Mastering JavaScript: From Sync to Async and Beyond](https://rajkamble21.hashnode.dev/javascript-promise-explained?utm_source=hashnode&utm_medium=feed)

How JS executes the code? JavaScript execution involves two main stages: creation and execution. These stages are managed within special environments called execution contexts. 1. Creation Phase (Setting Up the Stage) Global Execution Context (GEC):...

Jul 20, 2024 · 12 min read · rajkamble21.hashnode.dev  
Read the article

-   [#promise](https://hashnode.com/tag/promise)
-   [#promise-methods](https://hashnode.com/tag/promise-methods)
-   [#callstack](https://hashnode.com/tag/callstack)
-   [#event-loop](https://hashnode.com/tag/event-loop)

## Written by

[Raj Kamble](https://hashnode.com/@rajkamble21)

@rajkamble21

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

Software Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
