Node.js Flashcards
What is Node.js?
Runs on V8 engine and allows JS to run outside of a web browswer
What can Node.js be used for?
Access JS in the backend
What is a REPL?
Read Eval Print Loop - simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user. (ex: browser console)
When was Node.js created?
2009
What back end languages have you heard of?
Scripting languages: PHP, Python, Ruby, Perl, Lua
Systems languages: C, C++, Rust, D, Zig
Byte code languages: Java, C#,
What is a computer process?
Instance of a program being executed.
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
100 or more
Why should a full stack Web developer know that computer processes exist?
So they understand how much memory and moving parts of running. It’s part of potentially solving problems and writing viable code.
What is the process object in a Node.js program?
A model of the node.js object that is running.
How do you access the process object in a Node.js program?
Its a global object that can be accessed inside any module without requiring it.
What is the data type of process.argv in Node.js?
Array of strings
What is a JavaScript module?
Its a file (.js)
What values are passed into a Node.js module’s local scope?
exports, module, require, __filename, __dirname
Give two examples of truly global variables in a Node.js program.
Process, console, url
What is the purpose of module.exports in a Node.js module?
Defines dependencies on other modules and makes it available.