Skip to content

Instantly share code, notes, and snippets.

@hendrikcech
Created June 13, 2014 16:57
Show Gist options
  • Select an option

  • Save hendrikcech/505bb35125db839b9f6e to your computer and use it in GitHub Desktop.

Select an option

Save hendrikcech/505bb35125db839b9f6e to your computer and use it in GitHub Desktop.
var local = 'this is local to file1'
module.exports = 'this is exported by file1'
var file1Export = require('./file1.js')
console.log(file1Export) // output: 'this is exported by file1'
console.log(local) // output: undefined (or something)
@seanmonstar
Copy link

that'd a thrown ReferenceError: local is not defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment