0 votes
in JavaScript by
In JavaScript, what are the scopes of a variable?

1 Answer

0 votes
by

Scope of a variable means the region of your program within which it is defined. There are two scopes:

  1. Global Variables: A global variable has a global scope meaning that it will be visible everywhere within your code.
  2. Local Variables: Local variables will only be visible within the function in which it has been defined.

Related questions

0 votes
asked Oct 19, 2019 in JavaScript by SakshiSharma
0 votes
asked Aug 19, 2023 in Maven - Coalescing Pipeline by GeorgeBell
...