In JavaScript, var declarations create properties on the global object:
var
var x = 15; console.log(window.x); // logs 15 in browser console.log(glo
Variables declared via let keyword do not create accessible properties on a global object (window for a browser). Actually, Firefox fixed its behavior: let v = 42; 'v' in window // false
let v = 42; 'v' in window // false