Node Flashcards
What is Node.js?
An environment that allows you to execute javascript code without a browser needed
What can Node.js be used for?
Building servers without blocking code
What is a REPL?
Read-eval-print-loop
a simple programming environment that takes and runs user input, and returns the result, one line at a time
When was Node.js created?
May 2009
What back end languages have you heard of?
Python, Ruby, PHP, JavaScript, C#/.Net, C++ (online game servers)
What is the process object in a Node.js program?
The process object is a global that provides information about, and control over, the current Node.js process.
How do you access the process object in a Node.js program?
By using the process variable name
What is the data type of process.argv in Node.js?
an array
What is a JavaScript module?
a .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.
console, process
What is the purpose of module.exports in a Node.js module?
To be able to use functions and values between modules
How do you import functionality into a Node.js module from another Node.js module?
require(./name)
What is the JavaScript Event Loop?
Facilitates the order of operations for asynchronous code by monitoring the callback queue and the call stack
What is different between “blocking” and “non-blocking” with respect to how code is executed?
Synchronous and asynchronous
Blocking code prevents other operations from occurring
Non-blocking code can run in the background while other operations take place