Hey 👋,
I think you can add the fact that you can update the value of an let variable but never a const variable.
let
const
Let example:
let x = 0 x = 1 console.log(x) // 1
Const example:
const x = 0 x = 1 console.log(x) // TypeError cannot reassign x
Otherwise it is a nice article.
Thank you,
I just want to focus on the differences between let and var in this post.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey 👋,
I think you can add the fact that you can update the value of an
let
variable but never aconst
variable.Let example:
Const example:
Otherwise it is a nice article.
Thank you,
I just want to focus on the differences between let and var in this post.