I have been doing the following:
var store = window.localStorage; store.setItem()
but now I see code doing this:
localStora
Unless you've declared a variable named localStorage in a custom defined scope, they're the same. localStorage refers to window.localStorage. In fact every variable in global namespace can be accessed as window.
localStorage
window.localStorage
window.
For example: