---
title: "Discussion on \"Block scope Vs Global scope var, let, const !!!\" | Hashnode"
description: "Discussion on \"Block scope Vs Global scope var, let, const !!!\". const a = 1;\nlet b = 2;\nvar c = 3;\n\nif(true){\n  const a = 10\n  let b = 20\n  var c  = 30\n  console.log('Inside Block value of a = ' ,a ) \n  console.log('Inside Block value of b = ' ,b ) \n  console.log('Inside block value of c = ' ,c ) \n}\nconsole.log('..."
url: "https://hashnode.com/posts/block-scope-vs-global-scope-var-let-const/637ee9bf7cf4239ec3bd2693"
---

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

Discussion

# [Block scope Vs Global scope var, let, const !!!](https://kheersagar.hashnode.dev/block-scope-vs-global-scope-var-let-const?utm_source=hashnode&utm_medium=feed)

const a = 1; let b = 2; var c = 3; if(true){ const a = 10 let b = 20 var c = 30 console.log('Inside Block value of a = ' ,a ) console.log('Inside Block value of b = ' ,b ) console.log('Inside block value of c = ' ,c ) } console.log('...

Nov 24, 2022 · 2 min read · kheersagar.hashnode.dev  
Updated Nov 30, 2022  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#scope-is-javascript](https://hashnode.com/tag/scope-is-javascript)

## Written by

[Kheersagar Parja](https://hashnode.com/@Kheersagar)

@Kheersagar

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
