The lifetime of JavaScript global variables
问题 I read the following on w3schools and I don´t understand what it means by the second part: [global variables] remain available to new pages loaded into the same window. Anyone can enlighten me ? In a web browser, global variables are deleted when you close the browser window (or tab), but remain available to new pages loaded into the same window. link: https://www.w3schools.com/js/js_scope.asp 回答1: If w3schools really says that (heaven help us, it does) , it's just plain wrong, as can easily