---
title: "Discussion on \"[JavaScript] ECMAScript 6\" | Hashnode"
description: "Discussion on \"[JavaScript] ECMAScript 6\". Scopes of the var and let Keywords\nvar i = 'global scope'\n\nfunction checkScope() {\n  let i = 'function scope';\n  console.log(i); // function scope\n\n  if (true) {\n    i = 'block scope';\n    console.log(i); // block scope\n  }\n  console.log(i); // block..."
url: "https://hashnode.com/posts/javascript-ecmascript-6/64ee933d474c5ac524d65a7d"
---

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

Discussion

# [\[JavaScript\] ECMAScript 6](https://gayeonstegmaier.hashnode.dev/javascript-ecmascript-6?utm_source=hashnode&utm_medium=feed)

Scopes of the var and let Keywords var i = 'global scope' function checkScope() { let i = 'function scope'; console.log(i); // function scope if (true) { i = 'block scope'; console.log(i); // block scope } console.log(i); // block...

Aug 30, 2023 · 4 min read · gayeonstegmaier.hashnode.dev  
Read the article

## Written by

[Gayeon Stegmaier](https://hashnode.com/@GayeonStegmaier)

@GayeonStegmaier

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
