I have a global variable with classname defined to it. 

```
var className = "My Class is.";

```

And I will use that `className` variable to add more 

```
var a = function() {
  className = className + "a" ;
  console.log(className);
}    
console.log(className);
a();
console.log(className);

```

But after calling the function `a()`, variable `className` is still holding the data. I believe this is how JS behaves, but is there any way to reset `className` variable every time when it comes out of a function.