---
title: "Discussion on \"The difference between let, var and const...Javascript\" | Hashnode"
description: "Discussion on \"The difference between let, var and const...Javascript\". While developing with Javascript and going through pre-written code, you often come across let, var and const all used while declaring variables in Javascript. \nThe three are Javascript keywords that precede a variable name/identifier. These keywords..."
url: "https://hashnode.com/posts/the-difference-between-let-var-and-constjavascript/5f2184b9894c5f3775e2e15f"
---

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

Discussion

# [The difference between let, var and const...Javascript](https://faithgaiciumia.hashnode.dev/the-difference-between-let-var-and-constjavascript?utm_source=hashnode&utm_medium=feed)

While developing with Javascript and going through pre-written code, you often come across let, var and const all used while declaring variables in Javascript. The three are Javascript keywords that precede a variable name/identifier. These keywords...

Jul 29, 2020 · 2 min read · faithgaiciumia.hashnode.dev  
Read the article

-   [#2articles1week](https://hashnode.com/tag/2articles1week)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#interview](https://hashnode.com/tag/interview)

## Written by

[Faith Gaiciumia](https://hashnode.com/@shumia)

@shumia · Nairobi, Kenya

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

Front-End Developer

Web Dev - Nairobi, Kenya

## Responses 1

Markdown supported · ⌘↵ to post

[Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Jul 29, 2020](https://hashnode.com/posts/the-difference-between-let-var-and-constjavascript/5f2184b9894c5f3775e2e15f/comment/5f218e8ec45c1a3a005dd273)

Thanks for writing this amazing article :)

Quick feedback: You can add your code snippets in [triple backticks](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) to make it more readable.

```
var name="faith"; name="ian"; console.log(name);//ian

let name="faith"; name="ian"; console.log(name);//ian
```

[Faith Gaiciumia](https://hashnode.com/@shumia)

[Jul 29, 2020](https://hashnode.com/posts/the-difference-between-let-var-and-constjavascript/5f2184b9894c5f3775e2e15f/comment/5f218e8ec45c1a3a005dd273#reply-5f21a6251516ba3bae85b350)

Thank you Bolaji. I've been wondering how ti highlight it that way. I use the triple back ticks..i really don't know what's wrong. But I'll check it again. Thanks a lot!

[Faith Gaiciumia](https://hashnode.com/@shumia)

[Jul 29, 2020](https://hashnode.com/posts/the-difference-between-let-var-and-constjavascript/5f2184b9894c5f3775e2e15f/comment/5f218e8ec45c1a3a005dd273#reply-5f21b329ef20f63bcf98239d)

thank you! it works. I hadn't spaced it well. thanks

[Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Jul 29, 2020](https://hashnode.com/posts/the-difference-between-let-var-and-constjavascript/5f2184b9894c5f3775e2e15f/comment/5f218e8ec45c1a3a005dd273#reply-5f21bae5ef20f63bcf9823f5)

Yayy, congrats! [Faith Gaiciumia](https://hashnode.com/@shumia)
