Node Flashcards
What is Node.js?
A program that allows you to run JavaScript outside of a web browser
What can Node.js be used for?
To build scalable network applications
When was Node.js created?
2009
What back end languages have you heard of?
PHP, C+, C++, C#, Java, Ruby, Python, Perl
What is a computer process?
The instance of a computer program that is being executed by one or many threads. Contains program code and it’s activity
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
About 2,000 or more
Why should a full stack Web developer know that computer processes exist?
To make sure their program works!
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?
It’s always available because it is a GLOBAL
What is the data type of process.argv in Node.js?
It returns an array containing the command line arguments passed when the Node.js process was launched
What is a JavaScript module?
A single JavaScript 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
setTimeOut, setInterval, console, global
What is the purpose of module.exports in a Node.js module?
Specify what variables/functions you want to make available for other modules
export is an object, so you can export properties
How do you import functionality into a Node.js module from another Node.js module?
by calling the require() function