NODE Flashcards
What is Node.js?
Node.js is a JavaScript runtime built on Chrome
‘ s V8
JavaScript engine. Node.js uses an event-driven, non-
blocking I/O. (input and output) model that makes it lightweight and efficient
runs without a browser
What can Node.js be used for?
It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient It has a large and active open-source community
It runs on various platforms, including Windows, Linux, and macOS.
It supports real-time data applications with features such as WebSockets and WebRTC
What is a REPL?
The repl module provides a Read-Eval-Print-Loop (REPL) implementation that is available both as a standalone program or includible in other applications. It can be accessed using:
const repl = require(‘repl’);
that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise
A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple 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.
Chrome Dev Tools Console is one
when was node created
may 2009
what backend languages have you heard of
node python c++ mongoose PHP Ruby JAVA
What is a JavaScript module?
In the Node.js module system, each file is treated as a separate module. it can have simple or complex stuff
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.
process and console – global?
kind of like set timeout and set interval too
What is the purpose of module.exports in a Node.js module?
it saves functionality in a module/file - it exports a module so other modules can use it
what is a directoy>?
folder, a location to store files, one big folder
what is a relative file path?
its a file relative to starting position