---
title: "What is the difference between ‘var’ and ‘let’ keyword in JavaScript?"  
description: "What is the difference between ‘var’ and ‘let’ keyword in JavaScript?"  
author: "Rahul Roi"  
published: 2019-08-30  
updated: 2019-08-30  
canonical: https://www.mindstick.com/forum/95306/what-is-the-difference-between-var-and-let-keyword-in-javascript  
category: "javascript"  
tags: ["javascript", "scripting", "scripting language"]  
reading_time: 1 minute  

---

# What is the difference between ‘var’ and ‘let’ keyword in JavaScript?

Please [explain in Brief](https://www.mindstick.com/forum/157681/explain-in-brief-about-the-access-control-list-in-os).

## Replies

### Reply by Anonymous User

| **var** | **let** |
| --- | --- |
| ’var’ keyword was introduced in JavaScript code from the beginning Stage itself. | ‘let’ keyword is introduced in 2015 only. |
| ’Var’ keyword has function scope. The variable defined with var is available anywhere within the function | A variable declared with ‘let’ keyword has scope only within that block. So, let has a Block Scope. |
| The variable declared with ‘var’ be hoisted | The variable declared with ‘let’ be hoisted |


---

Original Source: https://www.mindstick.com/forum/95306/what-is-the-difference-between-var-and-let-keyword-in-javascript

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
