---
title: "Discussion on \"When to Use 'var', 'let' and 'const' in JavaScript\" | Hashnode"
description: "Discussion on \"When to Use 'var', 'let' and 'const' in JavaScript\". An article about how to use the var, let and const keyword in JavaScript."
url: "https://hashnode.com/posts/when-to-use-var-let-and-const-in-javascript/629b032ca414e02d6a701286"
---

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

Discussion

# [When to Use 'var', 'let' and 'const' in JavaScript](https://blog.segunajibola.com/when-to-use-var-let-and-const-in-javascript?utm_source=hashnode&utm_medium=feed)

An article about how to use the var, let and const keyword in JavaScript.

Jun 4, 2022 · 5 min read · blog.segunajibola.com  
Read the article

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

## Written by

[Segun Ajibola](https://hashnode.com/@segunajibola)

@segunajibola · Lagos, Nigeria

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

👨🏿‍💻 Frontend Developer | 📝 Technical Writer | 🔓 Open-Source Contributor

I'm a front-end web developer, enjoys working with TailwindCSS and React. Love to contribute to Open Source and meet new people on Twitter.

## Responses 2

Markdown supported · ⌘↵ to post

[Mario Montella](https://hashnode.com/@NetworkMario)

[Dec 18, 2023](https://hashnode.com/posts/when-to-use-var-let-and-const-in-javascript/629b032ca414e02d6a701286/comment/6580af6f0322c40183929c75)

good! [Segun Ajibola](https://hashnode.com/@segunajibola)

[Segun Ajibola](https://hashnode.com/@segunajibola)

[Dec 18, 2023](https://hashnode.com/posts/when-to-use-var-let-and-const-in-javascript/629b032ca414e02d6a701286/comment/6580af6f0322c40183929c75#reply-6580d62e0322c40183935e50)

Thanks for reading. Really appreciate it.

[Developer Avocado](https://hashnode.com/@AvocaDEV)

[Jun 4, 2022](https://hashnode.com/posts/when-to-use-var-let-and-const-in-javascript/629b032ca414e02d6a701286/comment/629b60667ab2e32eed5b91b4)

Thanks for article [Segun Ajibola](https://hashnode.com/@segunajibola), informative as always 👍

[Segun Ajibola](https://hashnode.com/@segunajibola)

[Jun 6, 2022](https://hashnode.com/posts/when-to-use-var-let-and-const-in-javascript/629b032ca414e02d6a701286/comment/629b60667ab2e32eed5b91b4#reply-629dced6fdc0394c22fdcc43)

Thanks for reading it.
