As per my understanding , in ES6 we can define global variables in 2 ways
var global1 = '1'; // CASE 1 In this case "global1" is set as a property of DOM window object , so window.global1 will print "1".
let global2 = '2'; // CASE 2 In this case "global2" is NOT set as a property of DOM window object , so window.global2 will print undefined.
My question is how to achieve case 2 in case of ES5.