Node.js Flashcards
What is Node.js?
an asynchronous event-driven JavaScript runtime,Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser
What can Node.js be used for?
build scalable network applications
What is a REPL?
(Read–eval–print loop) interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise.
When was Node.js created?
-May 27, 2009 11yrs ago
What back end languages have you heard of?
python, php, java, ruby
What is a computer process?
a process is 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)?
120+
Why should a full stack Web developer know that computer processes exist?
you need to know if your applications are running.
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. As a global, it is always available to Node.js applications without using require().
How do you access the process object in a Node.js program?
process (javascript Window)
What is the data type of process.argv in Node.js?
Array of strings
What is a JavaScript module?
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 , global
What is the purpose of module.exports in a Node.js module?
exporting code so that other files/modules are able to use it
How do you import functionality into a Node.js module from another Node.js module?
require() function // Used to import modules, JSON, and local files.
What is a directory?
file system that let users group files
What is a relative file path?
location of a file that is relative to the directory
What is an absolute file path?
the starting point of a file system / signifies starting.
What module does Node.js include for manipulating the file system?
fs module
What method is available in the Node.js fs module for writing data to a file?
fs.writeFile()
Are file operations using the fs module synchronous or asynchronous?
asynchronous