There is one thing in JavaScript which I can't understand.
When we declare a variable like this:
var var_Name
it called Local Variable.
When we declare a variable like this:
var_Name
it called Global Variable.
When exactly the browser resets their values? Once the page refreshes?
What I mean is, when the pages loaded, I declare a variable, and by the time, I increases it's value. When the value is going to set back to it's original initialization? When I refresh the page? or if it's a Local Variables it refreshes right away after stopping using it and if it's Global variable it refreshes only when the page refreshes?
Thanks!