---
title: "Discussion on \"Let vs. Var in JavaScript\" | Hashnode"
description: "Discussion on \"Let vs. Var in JavaScript\". In JavaScript, let and var are often used interchangebly. However, there are some differences in how these variables are scoped.\n\nlet variables are only visible in their nearest enclosing block ({ ... }), not before or after that block.\nlet variables..."
url: "https://hashnode.com/posts/let-vs-var-in-javascript/5f39968e0801bf3f76e6018c"
---

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

Discussion

# [Let vs. Var in JavaScript](https://cometcode.hashnode.dev/let-vs-var-in-javascript?utm_source=hashnode&utm_medium=feed)

In JavaScript, let and var are often used interchangebly. However, there are some differences in how these variables are scoped. let variables are only visible in their nearest enclosing block ({ ... }), not before or after that block. let variables...

Aug 16, 2020 · 3 min read · cometcode.hashnode.dev  
Read the article

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

## Written by

[Caelin Sutch](https://hashnode.com/@caelinsutch)

@caelinsutch

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

CTO at Bytes Robotics

## Responses 1

Markdown supported · ⌘↵ to post

[Alysha Reinard](https://hashnode.com/@pyetc)

[Aug 18, 2020](https://hashnode.com/posts/let-vs-var-in-javascript/5f39968e0801bf3f76e6018c/comment/5f3b84c11121a55bad977868)

Nicely explained. Thanks!
