Node.js Flashcards
What is Node.js?
an asynchronous event-driven JavaScript runtime that’s designed to build scalable network applications
What can Node.js be used for?
foundation of a web library or framework
What is a REPL?
Read–eval–print loop - 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?
2009
What back end languages have you heard of?
Python, PHP, Ruby
What is a computer process?
the instance of a computer program that is being executed by one or many threads
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
100+
What is the process object in a Node.js program?
a global variable that provides information about, and control over, the current Node.js process
How do you access the process object in a Node.js program?
just use the process variable (it’s global)
What is the data type of process.argv in Node.js?
array of strings
What is a JavaScript module?
each JavaScript file is a module
What values are passed into a Node.js module’s local scope?
exports, require()
Give two examples of truly global variables in a Node.js program.
process, console
What is the purpose of module.exports in a Node.js module?
to use variables and functionalities from other modules
How do you import functionality into a Node.js module from another Node.js module?
require(‘relative file path’)