node Flashcards
What is Node.js?
its a javaScript runtime
What can Node.js be used for?
running JS in the command line
What is a REPL?
read eval print loop, playground for code
When was Node.js created?
may 27, 2009
What back end languages have you heard of?
“scripting languages” (interpreted)
python, javascript, ruby,
php, perl,
“compiled” (machine code translated)
c, c++ golang, haskell, crystal, rust
partially compiled(jvm) java, scala, closure, kotlin
partially compiled( c#, f#
What is the process object in a Node.js program?
info about and control over the current node process
How do you access the process object in a Node.js program?
grab out of thin air because it’s global
What is the data type of process.argv in Node.js?
array of strings
What is a JavaScript module?
a separate .js file used to separate and organize work that can be exported to and called upon by other modules and .js files in the directory
What values are passed into a Node.js module’s local scope?
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?
creating a global data model that’s accessible from other modules in your file library
How do you import functionality into a Node.js module from another Node.js module?
assigning a require call with path to the file to a variable
What is a directory?
a special file that points to other files
What is a relative file path?
a path to a file from where you currently are
What is an absolute file path?
takes you from the root of the document to a specific file