---
title: "Discussion on \"Flow of code execution in JavaScript\" | Hashnode"
description: "Discussion on \"Flow of code execution in JavaScript\". Everything in JavaScript happens inside an \"Execution Context”. Whenever a JavaScript program is run an execution context is created.\nvar number=10;  //line1 \nfunction add(n) //line2\n{               //line3\nvar result=n+n; //line4\nreturn result;  //l..."
url: "https://hashnode.com/posts/flow-of-code-execution-in-javascript/63c2bffc3d43af2ba72799e7"
---

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

Discussion

# [Flow of code execution in JavaScript](https://shekharcodes.hashnode.dev/flow-of-code-execution-in-javascript?utm_source=hashnode&utm_medium=feed)

Everything in JavaScript happens inside an "Execution Context”. Whenever a JavaScript program is run an execution context is created. var number=10; //line1 function add(n) //line2 { //line3 var result=n+n; //line4 return result; //l...

Jan 14, 2023 · 2 min read · shekharcodes.hashnode.dev  
Read the article

-   [#execution-context](https://hashnode.com/tag/execution-context)
-   [#js](https://hashnode.com/tag/js)

## Written by

[Dewang Shekhar](https://hashnode.com/@shekharr)

@shekharr · India

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

full time coder, part-time explorer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
