Midterm Flashcards

1
Q

What was the original name for JavaScript?

A

LiveScript

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

What is the engine embedded in the browser called?

A

JavaScript Virtual Machine

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

What JavaScript engine runs in Chrome?

A

V8

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

What JavaScript engine runs in FireFox?

A

SpiderMonkey

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

Why is modern JavaScript known as a “safe” language?

A

No low-level access or memory or CPU

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

What are 3 great things about JavaScript?

A
  1. Full integration with HTML/CSS
  2. Simple things are done simply
  3. Supported by all major browsers and enabled by default
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does JSON stand for?

A

JavaScript Object Notation

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

What engine is Node.js built on?

A

V8

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

What is Node.js?

A

Cross-platform back-end JavaScript runtime environment

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

What are 5 main features of Node.js?

A
  1. Asynchronous and Event Driven
  2. Very Fast
  3. Single Threaded but highly scalable
  4. No buffering
  5. MIT License
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When is it not advisable to use Node.js?

A

CPU intensive applications

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

What are the 5 best use-cases for Node.js?

A
  1. I/O bound applications
  2. Data Streaming apps
  3. DIRT
  4. JSON API based apps
  5. Single Page Apps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is DIRT?

A

Data Intensive Real-time Applications

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

What character is used for Template Literals?

A

Backtick ( ` )

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

What 3 things can you do with a template literal?

A
  1. Multi-line strings
  2. String interpolation
  3. Tagged templates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you specify a placeholder in a template literal?

A

${ expression }

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

What is the difference between ES6 and ES2015?

A

They are synonyms

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

How long do Node.js versions enter Current release status?

A

6 months

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

What happens after a Node.js version ends current status?

A

Odd numbers become unsupported, even numbers enter Active LTS status

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

What is LTS status with Node.js?

A

Long-term support

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

What are 2 major benefits of arrow functions?

A
  1. Clean and concise syntax
  2. More intuitive scoping and “this” binding
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Which version of Node are we using?

A

18

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

What is blocking code?

A

Execution of code pauses until read operation completes.

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

What is a callback function?

A

Any function passed as an argument to another function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What 2 parts does npm consist of?
1. CLI tool 2. Online repository
26
What 4 metadata are provided in the package.json
1. name 2. version 3. description 4. license
27
How do you create the package.json file?
npm init
28
How do you get around default node using CJS when considering modules?
In package.json add "type" : "module"
29
What is a promise?
An object that holds the future value of an async operation
30
What are the 3 states of a promise?
1. Pending 2. Resolved 3. Rejected
31
What 2 callback functions does a promise take?
1. resolve 2. reject
32
How do we consume a promise?
then() catch()
33
What does Promise.all take as input?
An array of promises
34
What is the rest operator?
...
35
What is the rest operator used for?
Used to pass a variable number of arguments to a function
36
In a list of parameters, which position must the rest operator be used?
Last
37
What is process.argv?
An array of command line arguments
38
What npm package was used for command line arguments?
yargs
39
What is hideBin?
Shorthand for process.argv.slice(2)
40
What is the spread operator?
...
41
What is the spread operator used for?
Array construction and de-structuring
42
What is the difference between Promise.all and Promise.allSettled?
Promise.all stops execution if any promise is rejected, Promise.allSettled returns a status with each promise
43
What is the difference between using await and then() for a promise?
then() requires a callback function
44
How do you separate digits when writing big ints?
Underscores ( _ )
45
What is the ranking of different loops?
1. for 2. forEach 3. forOf 4. map
46
What npm package was used to load environment variables?
dotenv
47
What file is used to store the environment variables?
.env
48
What is MongoDB?
Document-oriented NoSQL database
49
What is the equivalent of a primary key in MongoDB?
_id
50
What is the equivalent of a table in MongoDB?
Collection
51
What is the equivalent of a row in MongoDB?
Document
52
What is the equivalent of a column in MongoDB?
Field
53
What is IIFE?
Immediately Invoked Function Expressions
54
What are the 2 parts of an IIFE?
1. Anonymous function scoped in the Grouping operator 2. ()
55
How does Object.keys(obj).length work?
Iterates over keys to compute temporary array and return its length
56
What JavaScript engine does MongoDB use?
SpiderMonkey
57
What does Array.map(...) return?
A new array
58
What 4 types of middleware can Express use?
1. Application 2. Error-handling 3. Router-level 4. Built-in
59
What are the 3 built-in middleware functions in Express?
1. express.static 2. express.json 3. express.urlencoded
60
What are the 2 functions for application level middleware?
1. app.use() 2. app.METHOD() METHOD = GET, PUT, POST
61
How do you declare a globally scoped variable?
var
62
How do you declare a scoped variable?
let
63
Which variable declaration type can be re-declared?
var
64
What is Fastify?
Low-overhead server framework built on top of Node.js
65
What is Mercurius?
An adapter for Fastify to communicate with GraphQL
66
How does JavaScript pass primitive types?
By Value
67
How does JavaScript pass NON primitive types?
By Reference
68
How does JavaScript pass string types?
By Value
69
What is MERN?
Mongo Express React Node
70
What stack are we using for the case study?
MFRN
71
What library is used for developing React apps?
Vite
72
How many node_modules folders are there in the case study?
2
73
What version of React was used in the case study?
18.2.0
74
What command starts the development server?
npm run dev
75
What is Material Design?
A design language developed by Google
76
What function would be used to sum all the numbers of an array?
reduce()
77
What function is used to do an existence check on an array?
includes()
78
What function is used to insert an element at the beginning of the array?
unshift()
79
What function is used to convert an array to a string?
join()
80
What is the starting point for a react application?
.render()
81
What file has the job to render the React elements?
main.jsx
82
What kind of react components do we focus on?
Functional
83
How is the class HTML attribute in React?
className
84
What 2 classes are extended to make a react class component?
1. React.Component 2. React.PureComponent
85
What do react class components allow us to use out of the box?
state
86
How do functional components utilize state?
Hooks
87
What Material Design library was used for React?
Material-UI
88
What is Functional Programming a a subset of?
Declarative Programming
89
What is Object Oriented Programming a subset of?
Imperative Programming
90
Which programming paradigm is more concerned with HOW?
Imperative Programming
91
Which programming paradigm is more concerned with WHAT?
Declarative Programming
92
What is CORS?
Cross Origin Resource Sharing
93
What is a reducer?
A function that provides instructions for combining things
94
What kind of hook allows lifecycle events?
useEffect
95