node Flashcards
What is Node.js?
JavaScript outside of a browser.
What can Node.js be used for?
build backend
What is a REPL?
read eval print loop. Browser console is a REPL. interactive shell that processes node.js expressions.
When was Node.js created?
May 27th, 2009 by Ryan Dahl
What back end languages have you heard of?
Python, PHP, Perl, JavaScript, Lua
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)?
500
Why should a full stack Web developer know that computer processes exist?
Full stack Web development is based on making multiple processes work together to form one application. Important to know that application has many parts.
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. JavaScript object that is a model of Node Js computer process.
How do you access the process object in a Node.js program?
Just process because it is global
What is the data type of process.argv in Node.js?
an array of strings
What is a JavaScript module?
a single ‘.js’ file. Modules are way to split an application into separate files instead of having all your application in one file. Allows you to establish values that you want to use on other modules.
What values are passed into a Node.js module’s local scope?
__filename, __dirname, exports, module, require
Give two examples of truly global variables in a Node.js program.
console, process, url.
What is the purpose of module.exports in a Node.js module?
so that you can reuse that function in other modules. you are exporting that to somewhere else.