Node 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?
Commonly used to build back ends for Web Applications, command-line programs, or other automation software developers wish to perform
What is a REPL?
Read, Eval, Print loop —> also termed a ‘language shell’
When was Node.JS created?
May 27, 2009 —> created by Ryan Dahl
What backend languages have you heard of?
Python, Ruby, Java, PHP, C, C++, c# (.net), JavaScript (&Node)
What is the process object in a Node.JS program?
A global that provides information and control over the current node.JS process
What is a ‘process’?
Any one program that your computer is running at a given time
When you execute a file with node, you start a…
Process!
How do you access the process object in a Node.JS program?
It’s globally available, so you can just type ‘process’ (although it also can be required in)
What data type does process.argv return in node.JS?
It returns an array containing command line args passed in when the process was launched
What will process.argv[0] be?
The path to node’s executionable file
What will process.argv[1] be?
The path to the JavaScript file being executed
What will process.argv[2] onwards be?
Any command line arguments
Every index in the argv array always is… (data type)
A string
What is a JavaScript module?
A module is a single .JS file.