Description
In Client side Javascript, when you declare a variable or a function, it is added to the global scope. For example, when you define a function, it is added to the global scope and it is available via
Summary
- In Client side Javascript, when you declare a variable or a function, it is added to the global scope.
- In real world applications, we often split our Javascript code into multiple files in a code editor.
- In object-oriented programming term, they are private and are not available outside that module.
- Every node application has at least one module, which is called the main module The module object contains properties, to see these properties, create a file in your code editor with nodejs installed.