menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Definition...
source image

Dev

7h

read

41

img
dot

Image Credit: Dev

Definition on global scope and local scope

  • In JavaScript, scope refers to the visibility or accessibility of variables.
  • Global scope is for variables declared outside of any function or block.
  • Local scope is for variables declared inside a function or block.
  • Global variables can be accessed from anywhere, while local variables are limited to their scope.

Read Full Article

like

2 Likes

For uninterrupted reading, download the app