node module system Flashcards
1
Q
What is a JavaScript module?
A
A single .js file
2
Q
What values are passed into a Node.js module’s local scope?
A
string, exports, require, module, __filename, __dirname
3
Q
Give two examples of truly global variables in a Node.js program.
A
Process object, and console, global object, set interval
4
Q
module.exports
A
whatever is assigned to module.exports will be returned
5
Q
process.argv
A
is an array, grab from index