Skip to content

Instantly share code, notes, and snippets.

@cary205
Forked from joepie91/double-number.js
Created June 10, 2019 05:24
Show Gist options
  • Select an option

  • Save cary205/a896459a6856be1c7d083b045b4e4dcf to your computer and use it in GitHub Desktop.

Select an option

Save cary205/a896459a6856be1c7d083b045b4e4dcf to your computer and use it in GitHub Desktop.
CommonJS module example
module.exports = function(number) {
return number * 2;
}
var doubleNumber = require("./double-number");
console.log(doubleNumber(4)); // 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment