In this article you learn what is difference between const vs let. You will learn what are they and how to used them.
Use const if variable value is constant and it will not be changed. const variable values cannot be changed.
const name = "John"; console.log(name); name = "Jane"; console.log(name);
You will get the following error as you cannot assign another value to const once it is assigned. So, use const only when you know that value is not going to change.
let is new var. We use it to store variable values. Use let to declare variables if that variable value will be changed.
let name = "John"; console.log(name); name = "Jane"; console.log(name);
If you have any question about this topic, you can ask me through the comment section.