Advertisement
728x90
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
1msg = "Hello"; // var is missing, it becomes global variableAdvertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 83
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
82of476