HTML Flashcards

(351 cards)

1
Q

Where do you put non-visible content about the HTML document?

A

In the Head tag

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

Where do you put visible content about the HTML document?

A

Body tag

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

Where do the and tags go in a valid HTML document?

A

Inbetween and

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

What is the purpose of a declaration?

A

State the kind of document it is

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

Give five examples of HTML element tags.

A

h1 p br body h2

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

What is the purpose of HTML attributes?

A

To define actions and parameters with in the elements.

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

Give an example of an HTML entity (escape character).

A

&amp is used to create an ampersand.

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

How do block-level elements affect the document flow?

A

Create sections for different content vertically

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

How do inline elements affect the document flow?

A

Create sections for different content horizontally

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

What are the default width and height of a block-level element?

A

Default width is the view port. Default height is bound by the above and below block.

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

What are the default width and height of an inline element?

A

Width is bound my the neighboring inline elements. Height is defined by the space it content takes.

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

What is the difference between an ordered list and an unordered list in HTML?

A

Number and bullet points

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

Is an HTML list a block element or an inline element?

A

Block. It creates a space that is effected by element below and above.

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

How do you indicate the relative link to a parent directory?

A

parent_dir/file.html

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

How do you indicate the relative link to a child directory?

A

/child_dir

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

How do you indicate the relative link to a grand parent directory?

A

../dir/file.html

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

What is the purpose of an HTML form element?

A

“Input!”

-Number 5 from Shortcircuit

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

Give five examples of form control elements.

A

Form, input, select, textarea, button

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

Give three examples of type attributes for HTML elements.

A

phone, text. email

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

Is an HTML element a block element or an inline element?

A

Inline, because it operates in horizontal space

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

What are the six primary HTML elements for creating tables?

A

thead, td, tr, tbody, th, tfoot

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

What purpose do the thead and tbody elements serve?

A

thead designates the top of the row for titles.

tbody contains all the data, rows, etc. of table

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

Give two examples of data that would lend itself well to being displayed in a table.

A

Financial information.

A restaurant menu.

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

Name three different types of values you can use to specify colors in CSS.

A

Names, rbg, hex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the names of the individual pieces of a CSS rule?
Selector, property, value
26
In CSS, how do you select elements by their class attribute?
Placing a period . in front of the selector
27
In CSS, how do you select elements by their type?
Naming the element
28
In CSS, how do you select an element by its id attribute?
Placing a # in front of the selector word.
29
What CSS properties make up the box model?
Margin, padding, border
30
Which CSS property pushes boxes away from each other?
Margin
31
Which CSS property add space between a box's content and its border?
Padding
32
What is a pseudo-class?
An effect or state that can be added by the browser onto any html element with a colon :
33
What are CSS pseudo-classes useful for?
Creating an effect or state for an html element when the user gives some kind of input
34
Name at least two units of type size in CSS.
point and pixels
35
What CSS property controls the font used for the text inside an element?
font-family
36
What is the default flex-direction of a flex container?
Horizontally
37
What is the default flex-wrap of a flex container?
nowrap
38
Why do two div elements "vertically stack" on one another by default?
They are a block element.
39
What is the default flex-direction of an element with display: flex?
Horizontally
40
What is the default value for the position property of HTML elements?
Horizontally
41
How does setting position: relative on an element affect document flow?
Everything moves around it but it moves.
42
How does setting position: relative on an element affect where it appears on the page?
It doesn't. It just floats where ever it boundaries are or relative to the edge of the view port.
43
How does setting position: absolute on an element affect document flow?
Everything moves around it.
44
How does setting position: absolute on an element affect where it appears on the page?
It sits where ever css sets it.
45
How do you constrain an absolutely positioned element to a containing block?
Set the block to position: relative and it will with in those boundaries
46
What are the four box offset properties?
Relative, fixed, absolute, static.
47
What is the purpose of variables?
Storing values
48
How do you declare a variable?
var varName;
49
How do you initialize (assign a value to) a variable?
var varName = 'some val';
50
What characters are allowed in variable names?
A-Z, a-z, _, &, numbers (not for first character)
51
What does it mean to say that variable names are "case sensitive"?
A-Z is different from a-z
52
What is the purpose of a string?
Store array of chars
53
What is the purpose of a number?
Math!
54
What is the purpose of a boolean?
true and false values
55
What does the = operator mean in JavaScript?
Assignment operator
56
How do you update the value of a variable?
Reassign it
57
What is the difference between null and undefined?
the former is assign to nothing, the later is not assigned
58
Why is it a good habit to include "labels" when you log values to the browser console?
Know what the code is doing. Its the only way,
59
Give five examples of JavaScript primitives.
String, numbers, bool, null, undefined
60
What data type is returned by an arithmetic operation?
A number
61
What is string concatenation?
joining strings
62
What purpose(s) does the + plus operator serve in JavaScript?
Addition and concatenation
63
What data type is returned by comparing two values (, ===, etc)?
bool
64
What does the += "plus-equals" operator do?
Adds existing var value to another value
65
What are objects used for?
Storing data
66
What are object properties?
Item contained by object
67
Describe object literal notation.
{}
68
How do you remove a property from an object?
delete someObj.someProp
69
What are the two ways to get or update the value of a property?
someObj.someProp | someObj['someProp']
70
What are arrays used for?
Storing data that has no property
71
Describe array literal notation.
[]
72
How are arrays different from "plain" objects?
They have no properties corresponding to values
73
What number represents the first index of an array?
0
74
What is the length property of an array?
Returns how many items are in array
75
How do you calculate the last index of an array?
someArr.length - 1
76
What is a function in JavaScript?
Repeatable set of instrucitons
77
Describe the parts of a function definition.
func key word, name, parameters, code block, return statement
78
Describe the parts of a function call.
Name, arguments.
79
When comparing them side-by-side, what are the differences between a function call and a function definition?
Making the code, recalling the made code to do something
80
What is the difference between a parameter and an argument?
Param: template to follow in call, Arg: data put into a call
81
Why are function parameters useful?
Setting out the kind of data that will go into the called function
82
Why do we log things to the console?
See what is happening in the code
83
What is a method?
Built in function callable on appropriate variables
84
How is a method different from any other function?
Its built in
85
How do you remove the last element from an array?
.pop
86
How do you round a number down to the nearest integer?
.floor
87
How do you generate a random number?
Math.random()
88
How do you delete an element from an array?
delete arr.someitem
89
How do you append an element to an array?
arr.push(someItem)
90
How do you break a string up into an array?
string.split(' ');
91
Do string methods change the original string? How would you check if you weren't sure?
Yes. Console log the string
92
Roughly how many string methods are there according to the MDN Web docs?
30ish
93
Is the return value of a function or method useful in every situation?
No
94
Roughly how many array methods are there according to the MDN Web docs?
30ish
95
What three-letter acronym should you always include in your Google search about a JavaScript method or CSS property?
mdn
96
Give 6 examples of comparison operators.
=== == !== < > <= >=
97
What data type do comparison expressions evaluate to?
bool
98
What is the purpose of an if statement?
Making decisions
99
Is else required in order to use an if statement?
no
100
Describe the syntax (structure) of an if statement.
if(){ | }
101
What are the three logical operators?
&& || !
102
How do you compare two different expressions in the same condition?
How do you compare two different expressions in the same condition?
103
What is the purpose of a loop?
Repeating work
104
What is the purpose of a condition expression in a loop?
See how the loop is repeated
105
What does "iteration" mean in the context of loops?
The number that counts up to keep track of the loops progress.
106
When does the condition expression of a while loop get evaluated?
the start
107
When does the initialization expression of a for loop get evaluated?
var i = 0;
108
When does the condition expression of a for loop get evaluated?
;i < someVal
109
When does the final expression of a for loop get evaluated?
;i++)
110
Besides a return statement, which exits its entire function block, which keyword exits a loop before its condition expression evaluates to false?
break;
111
What does the ++ increment operator do?
counts up by 1
112
How do you iterate through the keys of an object?
forEach?
113
What are the four components of "the Cascade".
Find all declarations whose selectors match a particular element. Sort these declarations by weight and origin. Sort the selectors by specificity. Sort by order specified.
114
What does the term "source order" mean with respect to CSS?
Elements lower in the casade will take priority
115
How is it possible for the styles of an element to be applied to its children as well without an additional CSS rule?
inheritance
116
List the three selector types in order of increasing specificity.
element selectors, class selectors, id selectors
117
Why is using !important considered bad practice?
CSS blocks will be difficult to use on other pieces of code.
118
Why do we log things to the console?
To know what is happening in the code
119
What is a "model"?
Simplified representation
120
Which "document" is being referred to in the phrase Document Object Model?
#document variable
121
What is the word "object" referring to in the phrase Document Object Model?
Nodes on the tree
122
What is a DOM Tree?
Nodes under the document, like

so forth

123
Give two examples of document methods that retrieve a single element from the DOM.
.getByID .getByClassSelecotor
124
Give one example of a document method that retrieves multiple elements from the DOM at once.
querySelectorAll()
125
Why might you want to assign the return value of a DOM query to a variable?
To access properties later
126
What console method allows you to inspect the properties of a DOM element object?
console.dir()
127
Why would a tag need to be placed at the bottom of the HTML content instead of at the top?
To load HTML first
128
What does document.querySelector() take as its argument and what does it return?
Gets first instance of selector. returns everything between the tags
129
What does document.querySelectorAll() take as its argument and what does it return?
Gets all elements matching args, returns everything between the tags
130
Why do we log things to the console?
To know what is going on in the code
131
What is the purpose of events and event handling?
Make changes dymanically
132
Are all possible parameters required to use a JavaScript method or function?
No, some are optionsal
133
What method of element objects lets you set up a function to be called when a specific type of event occurs?
event handleers?
134
What is a callback function?
Function that happens after an event handler
135
What object is passed into an event listener callback when the event fires?
event object
136
What is the event.target? If you weren't sure, how would you check? Where could you get more information about it?
console.log
137
What is the difference between these two snippets of code? element. addEventListener('click', handleClick) element. addEventListener('click', handleClick())
The first is loading it to be called on the event | The second one is calling the function right ways
138
What is the className property of element objects?
Renaming class name after selected by querySelector
139
How do you update the CSS class attribute of an element using JavaScript?
reassign it with className
140
What is the textContent property of element objects?
Change all the text of an element
141
How do you update the text within an element using JavaScript?
reassign using textContent
142
Is the event parameter of an event listener callback always useful?
yes
143
Would this assignment be simpler or more complicated if we didn't use a variable to keep track of the number of clicks?
The same
144
Why is storing information about a program in variables better than only storing it in the DOM?
Querying the dom takes alot of computer power.
145
What does the transform property do?
Distort an element on x,y, and z axis
146
Give four examples of CSS transform functions.
scale, rotate, translate, translate
147
The transition property is shorthand for which four CSS properties?
transition-delay transition-duration transition-property transition-timing-function
148
What event is fired when a user places their cursor in a form control?
focus
149
What event is fired when a user's cursor leaves a form control?
unfocus
150
What event is fired as a user changes the value of a form control?
input
151
What event is fired when a user clicks the "submit" button within a ?
submit
152
What does the event.preventDefault() method do?
prevents the default action is stopped
153
What does submitting a form without event.preventDefault() do?
Sends data with get
154
What property of a form element object contains all of the form's controls.
Elements property
155
What property of form a control object gets and sets its value?
Naming elements by name
156
What is one risk of writing a lot of code without checking to see if it works so far?
It not working and having to rewrite it
157
What is an advantage of having your console open when writing a JavaScript program?
Remembering to test code
158
Does the document.createElement() method insert a new element into the page?
no
159
How do you add an element as a child to another element?
.childAppend()
160
What do you pass as the arguments to the element.setAttribute() method?
arg name of attr, arg value of attr
161
What steps do you need to take in order to insert a new element into the page?
querySelector() childAppend()
162
What is the textContent property of an element object for?
Adding text
163
Name two ways to set the class attribute of a DOM element.
.className = 'whatEverClass' .setAttribute()
164
What are two advantages of defining a function to do create something (like the work of creating a DOM tree)?
Reusablity
165
Give two examples of media features that you can query in an @media rule.
Screen, braile
166
Which HTML meta tag is used in mobile-responsive web pages?
viewport meta tag
167
What is the event.target?
array of element
168
Why is it possible to listen for events on one element that actually happen its descendent elements?
Using closest()
169
What DOM element property tells you what type of element it is?
tag make
170
What does the element.closest() method take as its argument and what does it return?
selector. Returns the dom tree
171
How can you remove an element from the DOM?
remove()
172
If you wanted to insert new clickable DOM elements into the page using JavaScript, how could you avoid adding an event listener to every new element individually?
Attach event listener to parent
173
What is the event.target?
The object of the thing in play
174
What is the affect of setting an element to display: none?
idk
175
How can you retrieve the value of an element's attribute?
.getAttribute('')
176
At what steps of the solution would it be helpful to log things to the console?
All of them
177
If you were to add another tab and view to your HTML, but you didn't use event delegation, how would your JavaScript code be written instead?
An event listener for every tab in the exereice. We had 3 tabs and we selected them all.
178
If you didn't use a loop to conditionally show or hide the views in the page, how would your JavaScript code be written instead?
We had 3 tabs and we selected them all. And edit them in a indivudual code blocks
179
If you didn't use a loop to conditionally show or hide the views in the page, how would your JavaScript code be written instead?
We had 3 tabs and we selected them all. And edit them in a individual code blocks
180
What is JSON?
JavaScript Object Notation
181
What are serialization and deserialization?
Serialized is human readable. | Deserialized is easier to store in the computer
182
Why are serialization and deserialization useful?
S: means that we can work with the data easily D: make it easy for the computer work with the data and then shoot it back to us
183
How do you serialize a data structure into a JSON string using JavaScript?
.stringify()
184
How do you deserialize a JSON string into a data structure using JavaScript?
.parse()
185
How to you store data in localStorage?
localStorage.setItem()
186
How to you retrieve data from localStorage?
localStorage.getItem()
187
What data type can localStorage save in the browser?
strings, numbers, bool
188
When does the 'beforeunload' event fire on the window object?
Right before refresh.
189
What is a method?
function attach to a class
190
How can you tell the difference between a method definition and a method call?
``` Def: it just sits in the class Call: making it alive ```
191
Describe method definition syntax (structure).
Nested in an object
192
Describe method call syntax (structure).
class.someMethod();
193
How is a method different from any other function?
its attached to a class instead of free standing
194
What is the defining characteristic of Object-Oriented Programming?
It attaches action/usefulness to data
195
What are the four "principles" of Object-Oriented Programming?
Polymorphism, inhertience, abstraction, Encapsulation
196
What is "abstraction"?
Making the complex simple
197
What does API stand for?
Application Program Interface
198
What is the purpose of an API?
Abstracting the systems complexity for simple communication with an outside system
199
What is this in JavaScript?
place holder
200
What does it mean to say that this is an "implicit parameter"?
Inserted for another item. Not called outright
201
When is the value of this determined in a function; call time or definition time?
definition time
202
How can you tell what the value of this will be for a particular function or method definition?
You can't
203
How can you tell what the value of this is for a particular function or method call?
Left of the dot
204
What kind of inheritance does the JavaScript programming language use?
Prototypical
205
What is a prototype in JavaScript?
Using existing objects that other ojbects can use as a jumping off point
206
How is it possible to call methods on strings, arrays, and numbers even though those methods don't actually exist on objects, arrays, and numbers?
They inherited is from the prototype
207
If an object does not have it's own property or method by a given key, where does JavaScript look for it?
Prototype
208
What does the new operator do?
Creates new instance
209
What property of JavaScript functions can store shared behavior for instances created with new?
prototypical
210
What does the instanceof operator do?
tests if var is instance of an object
211
What is a "callback" function?
It doesn't have () because it will be called later
212
Besides adding an event listener callback function to an element or the document, what is one way to delay the execution of a JavaScript function until some point in the future?
setTImeout()
213
How can you set up a function to be called repeatedly without using a loop?
Set counter outside of function and increment inside function
214
What is the default time delay if you omit the delay parameter from setTimeout() or setInterval()?
0
215
What do setTimeout() and setInterval() return?
IntervalId
216
What is a client?
THe computer
217
What is a server?
The tthing the computer is sending info to and from
218
Which HTTP method does a browser issue to a web server when you visit a URL?
get
219
What three things are on the start-line of an HTTP request message?
Method / Protocol (http) / version 1.1
220
What three things are on the start-line of an HTTP response message?
Protocol / version / status message (like 404 or 200)
221
What are HTTP headers? | What are HTTP headers?
All the infos
222
Where would you go if you wanted to learn more about a specific HTTP Header?
MDN
223
Is a body required for a valid HTTP request or response message?
No
224
What is AJAX?
Tool that makes js async and enables api calls
225
What does the AJAX acronym stand for?
Async Json And Xml
226
Which object is built into the browser for making HTTP requests in JavaScript?
XMLHttprequest()
227
What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?
load event
228
Bonus Question: An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
Both are branching off of a prototype somewhere up stream
229
What is a code block? What are some examples of a code block?
Stuff betwee { }
230
What does block scope mean?
Things only exist inbetween { }
231
What is the scope of a variable declared with const or let?
Block scope
232
What is the difference between let and const?
let is mutable, const is immutable.
233
Why is it possible to .push() a new value into a const variable that points to an Array?
Arrays are mutable over riding the nature of const
234
How should you decide on which type of declaration to use?
Will the variable need to be reassigned later or how important is it that that var is immutable
235
What is the syntax for writing a template literal?
` ` (backticks), ${someVar} (variables)
236
What is "string interpolation"?
Slotting in a var like `sometext ${somevar} more text`
237
What is destructuring, conceptually?
making arr and obj into variables
238
What is the syntax for Object destructuring?
let {var1, var2, var3} = someOjb
239
What is the syntax for Array destructuring?
let [var1, var2, var3 ] = someArr
240
How can you tell the difference between destructuring and creating Object/Array literals?
For destructuring the obj/arr has already been created.
241
What is the syntax for defining an arrow function?
() => {}
242
When an arrow function's body is left without curly braces, what changes in its functionality?
that data is returned
243
How is the value of "this" determined within an arrow function?
At definition time.
244
What is a CLI?
command line interface
245
What is a GUI?
graphical user interface
246
What are the three virtues of a great programmer?
Laziness, impatience, hubris
247
What is Node.js?
JS on a computer (not a browser)
248
What can Node.js be used for?
JS on the backend
249
What is a REPL?
Read Eval Print loop
250
When was Node.js created?
2009
251
What back end languages have you heard of?
Python ruby node c c++ c# java php javascript | Perl Lisp Haskell Go Swift Rust Visual-Basic
252
What back end languages have you heard of?
Python ruby c c++ c# java php javascript | Perl Lisp Haskell Go Swift Rust Visual-Basic
253
What is a computer process?
Single program running your computer
254
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
Like at least 100
255
Why should a full stack Web developer know that computer processes exist?
Because code runs on computers
256
What is the process object in a Node.js program?
Pulls things from operating system
257
How do you access the process object in a Node.js program?
global
258
What is the data type of process.argv in Node.js?
Array of strings
259
What is a JavaScript module?
A single js file
260
What values are passed into a Node.js module's local scope?
``` exports require module __filename __dirname ```
261
What is the purpose of module.exports in a Node.js module?
exporting code to another file
262
How do you import functionality into a Node.js module from another Node.js module?
require()
263
What is the JavaScript Event Loop?
Event queue, blocking operations, execute call back,
264
What is different between "blocking" and "non-blocking" with respect to how code is executed?
blocking is synchronous, non-blocking is asynchronous | Blocking is code currently occupying the call stack
265
What module does Node.js include for manipulating the file system?
fs
266
What method is available in the Node.js fs module for writing data to a file?
fs.writeFile()
267
Are file operations using the fs module synchronous or asynchronous?
both
268
What is a client?
Initates communication
269
What is a server?
Send response because it a recieved a request
270
Which HTTP method does a browser issue to a web server when you visit a URL?
Get
271
What is on the first line of an HTTP request message?
request methods, destination, version number
272
What is on the first line of an HTTP response message?
Method version, status code
273
What are HTTP headers?
Meta information about website
274
Is a body required for a valid HTTP message?
No
275
What is NPM?
Node package manager
276
What is a package?
library to extend functionality
277
How can you create a package.json with npm?
npm init --yes
278
What is a dependency and how to you add one to a package?
npm install
279
What happens when you add a dependency to a package with npm?
It gets added to the package.json
280
What Express application method starts the server and binds it to a network PORT?
open()
281
How do you mount a middleware with an Express application?
app.method
282
Which objects does an Express application pass to your middleware to manage the request/response lifecycle of the server?
req, res
283
What is the appropriate Content-Type header for HTTP messages that contain JSON in their bodies?
JSON
284
What is the significance of an HTTP request's method?
Tells us and the program what is being done.
285
What is PostgreSQL and what are some alternative relational databases?
MySQL
286
What are some advantages of learning a relational database?
It works well in a lot of situtations. You can build anything you want and scale projects really big
287
What is one way to see if PostgreSQL is running?
TOP
288
What is a database schema?
Tables in a database and how they are organized.
289
What is a table?
Grouping
290
What is SQL and how is it different from languages like JavaScript?
No logic
291
How do you retrieve specific columns from a database table?
select * from someTable
292
How do you filter rows based on some specific criteria?
..where "someField" = 'someVal'
293
What are the benefits of formatting your SQL?
Constient style and readabliity
294
What are four comparison operators that can be used in a where clause?
= < >
295
How do you limit the number of rows returned in a result set?
limit 10
296
What are four comparison operators that can be used in a where clause?
= < > !=
297
How do you control the sort order of a result set?
... order by "someField" acs limit 10;
298
What is a foreign key?
id field from table2 in table1
299
How do you join two SQL tables?
select * from "someTable1" | join "someTable2" using ("someFeildInCommon")
300
How do you temporarily rename columns or tables in a SQL statement?
as
301
How do you delete rows from a database table?
delete "someRow" from "someTable"
302
How do you accidentally delete all rows from a table?
delete * from "someTable"
303
How do you update rows in a database table?
update "someRow" from "someTable"
304
Why is it important to include a where clause in your update statements?
To find exactly where you intend to update
305
How do you add a row to a SQL table?
insert into "products" ("name", "description", "price", "category") values ('Ostrich Pillow', 'Feel comfy and cozy!', 99, 'self care');
306
What is a tuple?
The values to be inserted insert into "products" ("name", "description", "price", "category") values ('Ostrich Pillow', 'Feel comfy and cozy!', 99, 'self care');
307
How do you add multiple rows to a SQL table at once?
insert into "products" ("name", "description", "price", "category") values ('Ostrich Pillow', 'Feel comfy and cozy!', 99, 'self care'), ('Tater Mitts', 'Scrub some taters!', 6, 'cooking') returning *;
308
How do you get back the row being inserted into a table without a separate select statement?
returning *
309
What are the three states a Promise can be in?
initial, fullfill, reject
310
How do you handle the fulfillment of a Promise?
.then()
311
How do you handle the rejection of a Promise?
.catch()
312
What is Array.prototype.filter useful for?
Getting items without needing a loop
313
What is "syntactic sugar"?
Makes it easier to read and write
314
What is the typeof an ES6 class?
Object I think.
315
Describe ES6 class syntax.
``` class SomeClass { somePrototypeMethod(){} } ``` function looks like function SomeFunction{} SomeFunction.prototype.somePrototypeMethod(){ }
316
What is "refactoring"?
Changing it to be better. More reliable, readable, etc. | And to get rid of technical debt.
317
What is Webpack?
It makes files accessible to one another through out the entire.
318
How do you add a devDependency to a package?
npm install somePackage --save-dev
319
What is an NPM script?
tells npm what to do like running webpack or a custom script
320
How do you execute Webpack with npm run?
npm run build
321
How are ES Modules different from CommonJS modules?
syntax CommonJS is not part of javascript core. ES-6 modules are part of the core.
322
What kind of modules can Webpack support?
Both I think
323
What is React?
A JS framework for creating webpages and funcitonality quickly
324
What is a React element?
Created element similar to document.createElement()
325
How do you mount a React element to the DOM?
ReactDOM.render()
326
What is Babel?
JS compiler. Converts new JS to old JS
327
What is a Plug-in?
Adds a specific functionality to extend bigger software
328
What is a Webpack loader?
Intersects files before they get included in the module
329
How can you make Babel and Webpack work together?
Babel loader
330
What is JSX?
JavaScript Extension
331
Why must the React object be imported when authoring JSX in a module?
Because react tries to stay as lightweight as possible
332
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
IDK the build script
333
What is a React component?
Can be called later with html style element
334
How do you define a function component in React?
like a variable assigned to JSX
335
How do you mount a component to the DOM?
Render or just call it
336
What are props in React?
Properties passed through interitance
337
How do you pass props to a component?
``` function SomFunc(props){ } ```
338
How do you write JavaScript expressions in JSX?
Fill this in
339
How do you create "class" component in React?
``` class SomeCla extends React.Component{ } ```
340
How do you access props in a class component?
this.props.some
341
What Array method is commonly used to create a list of React elements?
.map()
342
What is the best value to use as a "key" prop when rendering lists?
.Id or number
343
What does express.static() return?
Files and directories
344
What is the local __dirname variable in a Node.js module?
Current directory
345
What does the join() method of Node's path module do?
Joins strings to browse the file structure
346
What does fetch() return?
contents of a file
347
What is the default request method used by fetch()?
get
348
How do you specify the request method (GET, POST, etc.) when calling fetch?
Method key in the myInit object
349
When does React call a component's componentDidMount method?
After render
350
Name three React.Component lifecycle methods.
render() componentDidMount() componentDidUpdate()
351
How do you pass data to a child component?
Props like someProps={someInput}