![]() |
In JavaScript, global scope refers to the outermost scope in a program, where variables and functions are accessible from anywhere within the code, including inside functions, blocks, or nested scopes. Variables declared in the global scope are known as global variables and are accessible throughout the entire program. Example: Here, the variable Javascript
Output
I'm in global scope I'm in global scope |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 15 |