Home>
I have three questions about modules.
  • When exporting the following "add.js" as a module,
    As a global method in the imported program
    Will add () be added ...?
// add.js
/ **
 * @license
 * Add
 * Released under MIT license
 * /
;(function () {
 /**
   * @static
   * @category number
   * @param {number, number}
   * @returns {number}
   * @example
   *
   * add (1, 2);
   *>3
   * /
  function add (a, b) {
    return a + b
  }
} .call (this));
  • What is the meaning of the semicolon on the first line of the program below ...?
    (There is no particular meaning…?)
;(function () {
} .call (this));
  • What does "(function () {} .call (this))" mean ...?

I would appreciate it if you could teach me.