---
title: "Discussion on \"Lexical Scope in JavaScript – Beginner's Guide\" | Hashnode"
description: "Discussion on \"Lexical Scope in JavaScript – Beginner's Guide\". In this article, we are going to understand what lexical scope is by going through some helpful examples. \nWe will also have a brief discussion about how JavaScript compiles and executes programs. \nLastly, we will have a look at how you can use lexic..."
url: "https://hashnode.com/posts/lexical-scope-in-javascript/66bb55524c9d249e52882f2d"
---

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

Discussion

# [Lexical Scope in JavaScript – Beginner's Guide](https://freecodecamp.org/news/lexical-scope-in-javascript?utm_source=hashnode&utm_medium=feed)

In this article, we are going to understand what lexical scope is by going through some helpful examples. We will also have a brief discussion about how JavaScript compiles and executes programs. Lastly, we will have a look at how you can use lexic...

May 26, 2022 · 9 min read · freecodecamp.org  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#lexical-scoping](https://hashnode.com/tag/lexical-scoping)

## Written by

[Keyur Paralkar](https://hashnode.com/@keyurparalkar)

@keyurparalkar

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

Typescript fanatic, Frontend Engineer, volunteering at @jslovers\_del , and Swimmer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
