globaljavaimport@gmail.com ; 807-251-7812 0 $0.00

1135

A JavaScript global variable is declared outside the function or declared with window object. It can be accessed from any function. Let’s see the simple example of global variable in JavaScript.