Let's take just a few minutes to talk about using let to declare variables. Let is a new keyword that's a part of the ES six or ECMO script six standard. It is supported by all modern browsers. So the latest versions of those browsers support lat. lat works very similar to var for declaring variables. The main difference has to do with the scope of that variable once you've declared it.
Now, scope is something we have not talked about yet. And we'll delve into that in a lot more detail when we talk about scope. But basically what scope means is what area of the program or the code is this variable accessible, okay, and so let allows us to control that a little better. Let's look at how that works. Basically it works exactly like var. The only difference is instead of using var, as the first part of the declaration we use let it creates a variable that we can then reference.
In the same way. Once again, the main difference is the scope of it and we'll revisit this again when we talk about scope.