Languages
[Edit]
EN

JavaScript - what is scope?

17 points
Created by:
cory
1756

Scope determines the accessibility of variables. In JavaScript there are available few scopes.

1. global scopes (when variables are places direcly inside script)

Edit

Note: there is alternative way to create and access global variables:
- NodeJS JavaScript:

- WebBrowser JavaScript:

2. Local scopes: Function scopes

Edit

3. Local scopes: curly braces scopes

Edit

That scope works with let and const variables (it was introduced in ECMAScript 6 (ES6/ES2015)).

Alternative titles

  1. What is scope in JavaScript?
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join