Node.js Flashcards
What is Node.js?
A program that allows JavaScript to be run outside of a web browser.
What can Node.js be used for?
It is commonly used to build back ends for Web applications, command-line programs, or any kind of automation that developers wish to perform.
What is a REPL?
Read-eval-print_loop; A simple development environment that takes single user inputs executes them, and returns the result to the user.
When was Node.js created?
Node.js was created in 2009 by Ryan Dahl.
What back end languages have you heard of?
PHP, Java, Ruby, and Python
What is a computer process?
An instruction currently being carried out by the computer.
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
100+
Why should a full stack Web developer know that computer processes exist?
So you can understand how the computer interprets instructions and make your programs more efficient.
What is the process object in a Node.js program?
A global object that provides information about, and control over, the current Node.js process.
How do you access the process object in a Node.js program?
Since it’s a global object you can just reference it by name.
What is the data type of process.argv in Node.js?
An array of strings.
What is a JavaScript module?
A JavaScript file.
What values are passed into a Node.js module’s local scope?
__filename, __dirname, require, exports, module
Give two examples of truly global variables in a Node.js program.
console, process, setInterval, setTimeout, clearInterval, clearTimeout, global
What is the purpose of module.exports in a Node.js module?
So that we can access files from elsewhere in the code (another module).