Abstract


Terminologies


JavaScript Runtime Environment

  • A environment to run Javascript, independent of Browser

Module

  • Basically JavaScript Module
  • The methods to be explicitly exposed, there are mainly 3 ways
    1. module.exports.<METHOD_NAME> = <METHOD_NAME>
    2. exports.<METHOD_NAME> = <METHOD_NAME> (Syntactic Sugar)
    3. exports.<METHOD_NAME> = <FUNCTION_DEFINITION>

CommonJS

  • Use the keyword const {...} = require()
  • Loads the entire Module

ES modules