Node.js Flashcards
What is Node.js?
Node is a program that allows JavaScript to run outside of the web browser.
What can Node.js be used for?
Node can be used to build back end web apps, command line programs.
What is a REPL?
Read Eval Print Loop
What is a computer process?
The instance of a computer program that is being executed by one or many threads.
Why should a full stack Web developer know that computer processes exist?
Full stack development depends on many processes working together to form an app. So understanding what these processes are doing or at least are running is important.
What is the process object in a Node.js program?
It is a global object that has information and control over the current node process.
How do you access the process object in a Node.js program?
Since it’s a global object, you can access it simply by typing process.
What is the data type of process.argv in Node.js?
The data type is an array.
What is a JavaScript module?
A single js file. Each file is a small part of many other modules that come together to be a program.
What values are passed into a Node.js module’s local scope?
__dirname, __filename, exports, module, require.
Give two examples of truly global variables in a Node.js program.
global and process
What is the purpose of module.exports in a Node.js module?
So that module file knows it is going to be allowing other modules to pair/group up with it.
How do you import functionality into a Node.js module from another Node.js module?
The require method is used in the module that wants to use a functionality thats from another module.
What is the JavaScript Event Loop?
The event loop is how the JavaScript runtime pushes asynchronous callbacks onto the stack once the stack is cleared.
What is different between “blocking” and “non-blocking” with respect to how code is executed?
.