Javascript scope


/ Published in: JavaScript
Save to your folder(s)

There are two scopes in JavaScript: global and function. If you don\'t declare a variable (using var), it assumes global. \r\n\r\nVariables declared in functions have function scope.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.