NODE Flashcards

1
Q

What is Node.js?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What can Node.js be used for?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a REPL?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

when was node created

A

may 2009

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what backend languages have you heard of

A

node python c++ mongoose PHP Ruby JAVA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a JavaScript module?

A

In the Node.js module system, each file is treated as a separate module. it can have simple or complex stuff

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What values are passed into a Node.js module’s local scope?

A

exports, require, module, __filename, __dirname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Give two examples of truly global variables in a Node.js program.

A

process and console – global?
kind of like set timeout and set interval too

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of module.exports in a Node.js module?

A

it saves functionality in a module/file - it exports a module so other modules can use it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a directoy>?

A

folder, a location to store files, one big folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is a relative file path?

A

its a file relative to starting position

How well did you know this?
1
Not at all
2
3
4
5
Perfectly