News for hackers. Stuff that matters.
Re:JavaScript async/await implemented in V8 by cwmma on Tuesday May 17, 2016 @10:46AM (#11714069)
variables declared with the var keyword are functionally scoped in JS so they are local to the function they are declared in and are lexically scoped to the closure of that function. So your local variables you can be fairly confident are not mutated anywhere else.

That being said you can totally have globals and whatnot that can be mutated anywhere (e.g. parameters passed to a function or literal globals installed in the global scope) or things declared at a lower scope that can still be modified by multiple functions.

Hope that clears it up

There are no comments on this comment yet.