ES6: Explore Differences Between the var and let Keywords - pulkitbhutani/My-FreeCodeCamp-Code GitHub Wiki

One of the biggest problems with declaring variables with the var keyword is that you can overwrite variable declarations without an error.

var camper = 'James';
var camper = 'David';
console.log(camper);
// logs 'David'

As you can see in the code above, the camper variable is originally declared as James and then overridden to be David.

A new keyword called let was introduced in ES6 to solve this potential issue with the var keyword.

let keyword will give an error in the situations like above.

Solution to challange -

let catName;
let quote;
function catTalk() {
  "use strict";

  catName = "Oliver";
  quote = catName + " says Meow!";

}
catTalk();