The global var variables are added to the global object as properties.
var counter = 0;
console.log(window.counter); //  0
However, the let variables are not added to the global object:
let counter = 0;
console.log(window.counter); // undefined
by Luka Tatarishvili
4 years ago
JavaScript
variables
1
Pro tip: use ```triple backticks around text``` to write in code fences