An introduction to the Use of Modularity in Node.js for Beginners

By Deborah Emeni's Blog - 2020-11-20

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.

 

Topics

  1. Frontend (0.11)
  2. Coding (0.1)
  3. Backend (0.06)

Similar Articles

An introduction to TypeScript and ES Modules

By DEV Community - 2020-12-11

JavaScript is everywhere, and TypeScript is JavaScript with some cool extra features. You've probabl... Tagged with javascript, typescript, webdev, node.

Building server-side rendering for React in AWS Lambda

By Amazon Web Services - 2021-01-27

This post demonstrates two ways you can implement and deploy a solution for server-side rendering in React applications, by using Lambda or Lambda@Edge. It also shows how to use open-source tools and ...