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?
To build back ends for web applications, command-line programs or any kind of automations that devs wish to perform.
What is a REPL?
Read-eval-print loop. It is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user.
When was Node.js created?
It was created May 27, 2009
What back end languages have you heard of?
JavaScript, Java, Python, Ruby, PHP, VBA
What is a computer process?
The instance of a computer program that is being executed by one or many threads (smallest sequence of programmed instructions). It contains the program code and its activity.
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
6
Why should a full stack Web developer know that computer processes exist?
Based on multiple processes to make applications work. Programming server and database.
What is the process object in a Node.js program?
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?
You can just call the ‘process’ object since it is a global variable or by using require(‘process’).
What is the data type of process.argv in Node.js?
An array of strings
What is a JavaScript module?
It is a file
What values are passed into a Node.js module’s local scope?
File name, dir name, exports, module, require
Give two examples of truly global variables in a Node.js program.
Process and console
What is the purpose of module.exports in a Node.js module?
To be able to access it from another file