Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create module in js

function myModule() {
  this.hello = function() {
    return 'hello!';
  }

  this.goodbye = function() {
    return 'goodbye!';
  }
}

module.exports = myModule;
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #create #module #js
ADD COMMENT
Topic
Name
7+3 =