InterviewHubPRO
Section Overview
Q86

Question 86 of 521

Part 2: Promises, Callbacks, Async & Strict Mode (54 - 103)

17%
JavaScript Internals (521 Qs)•Part 2: Promises, Callbacks, Async & Strict Mode (54 - 103)

What are global variables

Global variables are those that are available throughout the length of the code without any scope. The var keyword is used to declare a local variable but if you omit it then it will become global variable

javascript
msg = "Hello"; // var is missing, it becomes global variable