Node JS Flashcards
What is Node.js?
It is a JavaScript environment that allows you to run JavaScript outside of a browser
What can Node.js be used for?
It can be used to run server applications, run command lines, program robots, etc.
What is a REPL?
Stands for Read-Eval-Print-Loop, and refers to a computer programming environment where user inputs are taken one line at a time, executed, and returned; a language shell
When was Node.js created?
2009
What is a computer process?
An instance of a computer program that is being executed; a “task” in the task manager
Why should a full stack Web developer know that computer processes exist?
We will be working with computer processes that appear in our “stack”
What is the process object in a Node.js program?
An object representing the current Node.js process that is being run
How do you access the process object in a Node.js program?
Using the variable process
What is the data type of process.argv in Node.js?
array
What is a JavaScript module?
An individual .js file
What values are passed into a Node.js module’s local scope?
exports, require, module, __filename, __dirname
Give two examples of truly global variables in a Node.js program.
process, global
What is the purpose of module.exports in a Node.js module?
It allows other files to import objects from the module
How do you import functionality into a Node.js module from another Node.js module?
Using the require function require(‘relativeUrl.js’)
What is a directory?
A location that stores files and other directories