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

1 Answer

0 votes

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 Jul 26, 2020 in Spring by SakshiSharma
0 votes
asked Feb 6, 2020 in JavaScript by rajeshsharma
0 votes
asked Mar 21 in Spring Framework Database Integration by sharadyadav1986