What is difference between local and global scope in JavaScript ?

devquora
devquora

Posted On: Oct 31, 2022

 

The main difference between local & global scope in javascript is - 

Global scope is used for all objects and variables defined in a program at any point in time. On the other hand, the local scope will be visible only within a function where it is defined.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    JavaScript Interview Questions

    Explain what is Javascript?

    Javascript Javascript is an object-oriented computer programming language commonly used to create interactive effects wi..