Explore Differences Between the var and let Keywords

 Unlike var, when you use let, a variable with the same name can only be declared once.

A keyword called let was introduced in ES6, a major update to JavaScript, to solve this potential issue with the var keyword. 

let catName = "Oliver";
let catSound = "Meow!";
Was this article helpful?

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top