---
title: "Discussion on \"Block scope and variable shadowing in JS\" | Hashnode"
description: "Discussion on \"Block scope and variable shadowing in JS\". To understand shadowing in JavaScript, we need to be clear with the scope first.\nRefer the below link :\nSCOPE\nShadowing is nothing but a variable replacing the value of another variable inside a block if declared with same name.\nvar a = 10 ;\n        ..."
url: "https://hashnode.com/posts/block-scope-and-variable-shadowing-in-js/65f1947c4bba34ea5dc76a6d"
---

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

Discussion

# [Block scope and variable shadowing in JS](https://vijayashree.hashnode.dev/block-scope-and-variable-shadowing-in-js?utm_source=hashnode&utm_medium=feed)

To understand shadowing in JavaScript, we need to be clear with the scope first. Refer the below link : SCOPE Shadowing is nothing but a variable replacing the value of another variable inside a block if declared with same name. var a = 10 ; ...

Mar 13, 2024 · 1 min read · vijayashree.hashnode.dev  
Read the article

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

## Written by

[Vijaya Shree](https://hashnode.com/@vijayashree)

@vijayashree

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

Frontend Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
