FrontendDeveloper.in

JavaScript question detail

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

msg = "Hello"; // var is missing, it becomes global variable
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399