DEV Community

loading...

Discussion on: Variables in JavaScript

Collapse
mellen profile image
Matt Ellen

The scope of var is not global if it's used within a function. var is scoped to the function it's declared in.