---
title: "Discussion on \"Why const over let\" | Hashnode"
description: "Discussion on \"Why const over let\". Is it true that const makes a variable immutable?"
url: "https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9"
---

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

Discussion

# [Why const over let](https://tigerabrodi.blog/why-const-over-let?utm_source=hashnode&utm_medium=feed)

Is it true that const makes a variable immutable?

Sep 1, 2022 · 2 min read · tigerabrodi.blog  
Read the article

-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

@tigerabrodi · Germany

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

Obsessed with crafting software.

Just a guy who loves to write code and watch anime.

## Responses 4

Markdown supported · ⌘↵ to post

[Ákos Kőműves](https://hashnode.com/@akoskm)

[Sep 9, 2022](https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9/comment/631aeab800230a29830de2b4)

This topic is strange to me, probably because, by default, I write const. I don't know why. 😄

There's also a linter rule that fixes all your unnecessary let usages [eslint.org/docs/latest/rules/prefer-const.](https://eslint.org/docs/latest/rules/prefer-const.)

[Thilakmani](https://hashnode.com/@thilakmanib)

[Sep 2, 2022](https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9/comment/6311b4cb75af73ad1f067014)

Nice Point

[Lucas Gazzola](https://hashnode.com/@Lucas017)

[Sep 1, 2022](https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9/comment/6311400a75af73ad1f065edd)

Great article. It makes a point. And always remember, don't use **var** anymore.

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

[Sep 2, 2022](https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9/comment/6311400a75af73ad1f065edd#reply-63120b4c56df9e8e5025ff34)

fosho, the ones ive seen using var in today's age are those that have like 15+ yrs of experience and don't code in JS that often lmao

[Muphet](https://hashnode.com/@Muphet)

[Sep 7, 2022](https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9/comment/6311400a75af73ad1f065edd#reply-63182961961d2507e75fd3aa)

let and const have block scope, var doesn't. there still are cases that you need to pass variables out of blocks

[Maxi Contieri](https://hashnode.com/@mcsee)

[Sep 1, 2022](https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9/comment/631115a456df9e8e5025d8c3)

> Reassignments are wrong, they are a code smell, and they aren't good to write, avoid them whenever you can.

Exactly!

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

[Sep 2, 2022](https://hashnode.com/posts/why-const-over-let/63110f6256df9e8e5025d7f9/comment/631115a456df9e8e5025d8c3#reply-63120b6856df9e8e5025ff3c)

I had to get it clear haha

let just be confusing stuff, making you think reassignments happen everywhere
