Master Deck Flashcards

1
Q

How are if statements structured in Python?

A

if (statement):

(ONE TAB INDENT)action

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

In JavaScript, maps are similar to objects but allow for __________.

A

Any data type as the key in the key-value pairs.

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

In JavaScript maps, the three main functions are _____.

A

.set(), .has(), .delete()

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

What is the inequality operator in Python?

A

!=

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

How do you copy a JavaScript object without simply referencing the original object?

A

const person2 = {…person1};

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

In JavaScript, you should use a map instead of an object when you need to maintain _________.

A

the order of your items

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

In JavaScript, how do you convert an object into a JSON?

A

JSON.stringify(object)

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

Given a JSON, how do you convert it into an object in JavaScript?

A

JSON.parse(‘json’)

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

What is the ‘and’ operator in Python?

A

and

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

The _______ JavaScript library has a bevy of tools for working with objects and arrays.

A

Lodash

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

What is the ‘or’ operator in Python?

A

or

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

Given two JavaScript objects, meatInventory and veggieInventory, how would you merge them into one object called ‘inventory’?

A

const inventory = {…meatInventory, …veggieInventory};

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

How can you test whether a variable called ‘names’ is an array in JavaScript?

A

Array.isArray(names)

this will return either a true or a false

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

What is the ‘not’ operator in Python?

A

‘not’

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

The ‘…’ operator in JavaScript is called the _____ operator.

A

spread

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

Given the list:

seq = [1, 2, 3, 4, 5]

create a ‘for’ statement in Python that prints each element in the list.

A

for x in seq:

indent)print(x

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

If a pandas DataFrame named df has a column named W, how do you retrive W from df?

A

df[‘W’]

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

Given a pandas DataFrame named df that contains two columns X and Y, how do you create a third column named Z where Z = X + Y?

A

df[‘Z’] = df[‘X’] + df[‘Y’]

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

Given a DataFrame named df, how do you retrieve the value at row X, column Y?

A

df[‘Y’][‘X’]

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

What are the two methods available for collecting rows or columns from pandas DataFrames?

A

.loc

.iloc

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

In the pandas programming library, what are the two main methods for dealing with missing data?

A

.dropna()

.fillna()

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

How can DataFrames be concatenated using pandas?

A

pd.concat()

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

What method is used to return all unique values from a pandas Series?

A

pd.Series().unique()

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

On the command line, what command returns your current working directory?

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
In Python, what command is used to import the matplotlib charting library?
import matplotlib.pyplot as plt
26
What command allows you to actually see your plots within the Jupyter Notebook?
%matplotlib inline
27
The ______ command must be used to show a plot outside the Jupyter Notebook.
plt.show()
28
What command imports the pandas datareader?
import pandas_datareader.data as web
29
What command serves to import the Quandl library into Python?
import quandl
30
The _____ command fixes most matplotlib formatting errors.
plt.tight_layout()
31
In Python, what is a set?
An unordered collection of unique items.
32
Create a basic set in Python.
set = {1,2,3}
33
What Python command imports the math library?
import math
34
Given an array of integers in NumPy, how would you return an array that excludes all values below 4?
array[ array > 3]
35
What is the quickest way to create an array of 10 zeros in NumPy?
np.zeros(10)
36
What command is used to create an array of linearly spaced points in NumPy?
np.linspace()
37
What is the exponent library in Python?
**
38
In JavaScript, what is the main difference between a node list and an array?
A node list lacks many of the methods that an array has.
39
What text allows you to define a function in Python?
def myFunction():
40
What character defines the ternary operator in JavaScript?
?
41
When creating a function in Python, how do you set up a docstring?
Three sets of double quotations (""")
42
What does D3.js stand for?
Data Drive Documents
43
What is a lambda expression in Python?
A function to use one time that has no name
44
What are the CRUD operations?
create, read, update, delete
45
What is an important component of a custom Python function if you plan to use it for future calculations or other functions?
the return statement
46
What is a React component?
a reusable piece of code for the user interface of a website
47
What keyword can be used to apply a function to every element of a list in JavaScript?
map
48
Firebase is a service provided by ________.
Google
49
How do you view a function's documentation in the Jupyter Notebook?
Shift+Tab
50
How do you kill an environment in Terminal?
CTRL+C
51
How could you transform a string to all lowercase or uppercase letters in Python?
By appending .upper() or .lower() to the string's variable name.
52
In a React application, information is communicated to a component through _________.
props
53
How can you split a string into a list of strings? Works in both Python and JavaScript.
.split()
54
In a React application, JSX does not have any ______ built into it.
logic
55
How do you remove an item from a list in Python?
by appending .pop() and passing in the item's index
56
How do you import React into a JavaScript application?
import React from 'react';
57
What is an alternative (weird) way to concatenate variable values in a string in Python?
By adding { } into the string and appending .format
58
In layman's terms, what is a React component?
A reusable piece of code for your website
59
In Python, how can you return the length of a list named my_list?
len(my_list)
60
Every React component must have a _____ method.
render
61
What command imports the NumPy library into a Python application?
import numpy as np
62
In JSX, the "class" attribute is replaced by ________.
className
63
Given a list my_list = [1,2,3], how can you turn it into a NumPy array?
np.array(my_list)
64
In React, a render method can only return _____ element(s), so ______ is important.
one, nesting.
65
Using NumPy, how could we easily generate a 4x4 identity matrix?
np.eye(4)
66
To return multiple sister elements in a React render method, you should wrap them in a ___________ method.
67
Hoe can you access NumPy's group of random number generators?
type 'np.random' then hit Tab
68
How do you comment in JSX?
{/* comment */}
69
Given a 1x25 matrix called "array" in NumPy, how could you reshape it to a 5x5 matrix?
array.reshape(5,5)
70
How can you include JavaScript in JSX?
By wrapping it in curly brackets
71
What does JSX stand for?
JavaScript XML
72
Given an array called 'matrix' in NumPy, how can you return the highest value in the array?
matrix.max()
73
In React props, anything other than a string requires ______________.
curly brackets
74
What happens when you add two arrays in NumPy?
The arrays are summed on an element-by-element basis.
75
In React, props are equivalent to HTML _______.
attributes
76
Given two arrays in NumPy named array1 and array2, what would the command array1*array2 output?
it would multiply the arrays on an element-by-element basis
77
How do you take the square root of every element in an array using NumPy?
np.sqrt(array)
78
What is a stateless functional component?
A component that receives props as input and outputs JSX.
79
One of the main features of jQuery is the use of _____.
The dollar sign
80
In JavaScript, what does IIFE stand for?
immediately invoked function expression
81
Tabs in Excel are equivalent to _____ in a database.
tables
82
One of the core principles of functional programming is ______.
To not change things
83
What does SQL stand for?
Structured Query Language
84
In functional programming, changing or altering things is called ______.
mutation
85
Where do we spend most of our time in pgAdmin4?
the Query Tool
86
Who owns Heroku?
Salesforce
87
What symbol runs code in pgAdmin4?
the lightning bolt
88
What is the JavaScript method for concatenation?
.concat()
89
The ____ language is case-insensitive
SQL
90
The _____ of a function is the number of arguments it requires.
arity
91
In SQL, the COUNT function does not consider _____.
NULL values
92
To _______ a function means to convert a function of N arity into N functions of arity 1.
curry
93
Given a table called "payment", write a SQL query to count the number of rows it contains.
SELECT COUNT(*) FROM payment;
94
How do you make an image's width equal to the viewport width using Bootstrap?
add the class "img-responsive" to the tag
95
Every SQL query must end in _______.
A semicolon
96
How do you center text using Bootstrap?
class="text-center"
97
Given a DataFrame named 'banks', how do you retrieve a list of the DataFrame's columns?
banks.columns
98
____ is the most powerful and customizable visualization library for Python.
matplotlib
99
Given a Python list called my_list, how do you transform it into a pandas Series?
pd.Series(my_list)
100
What command allows you to start a Jupyter Notebook from the terminal?
jupyter notebook
101
In HTML, radio buttons are a type of _____
input
102
In a CSS stylesheet, how do you change the appearance of a link when it is hovered over?
a: hover { }
103
In HTML, what is the purpose of a div element?
A div element is a general purpose container for other elements
104
In CSS, what do the letters of hsl() stand for?
hue, saturation, lightness
105
The ____ element is probably the most commonly used HTML element of all.
div
106
How to you create an in-line comment in JavaScript?
//This is an inline comment
107
What HTML tag is used to communicate to a browser that you are using HTML5?
108
What does NaN stand for?
Not a Number
109
CSS class declarations start with ___
a period
110
Given a string in JavaScript named myString, how do you calculate its length?
myString.length
111
What are the three default fonts that are available in all browsers?
monospace serif sans-serif
112
What function allows you to append data to the end of a JavaScript array?
.push()
113
In CSS, ____ attributes should be unique.
id
114
In JavaScript, what is the different between .shift() and .pop()?
shift works on the first element of an array while pop works on the last element of an array
115
How do you return the first letter of a string in Python?
string[0]
116
If you want to run a function after 5 seconds in JavaScript, you would use a ____
timeout function
117
In JavaScript, what are object methods?
functions contained inside an object
118
When creating id attributes in a CSS stylesheet, they always start with ____.
#
119
In JavaScript, the ____ function adds an element to the beginning of an array.
unshift
120
In JavaScript, objects that are globally available can be called from the ____ object.
window
121
What is hoisting in JavaScript?
hoising allows you to access functions and variables before they have been created
122
In JavaScript, what are closures?
closures are the ability for a child function to access variables from a higher-level scope even after the functions have been closed
123
What does DOM stand for?
document object model
124
The DOM can be seen in the ____ tab of a browser inspector.
Elements
125
The characteristics of a browser window are stored in the ____ object.
window
126
In SQL, what do temporal data types store?
date and time related data
127
What does .svg stand for?
Scalable Vector Graphics
128
In SQL, what is the difference between the LIKE and ILIKE statements?
ILIKE is not case sensitive
129
What is Font Awesome?
A convenient library of icons
130
In SQL, what are the four aggregate functions?
MIN MAX AVG SUM
131
In Bootstrap, the number of columns always adds to ____.
12
132
What is the purpose of the AS statement in SQL?
to rename a column
133
Given two tables A and B, what does the INNER JOIN clause do?
The INNER JOIN clause returns rows in table A that have the corresponding rows in Table Y
134
What does Sass stand for?
Syntactically Awesome StyleSheets
135
React is a open source project originally created by ____.
Facebook
136
What is the purpose of a subquery in SQL?
A subquery allows us to use multiple SELECT statements, where we basically have a query within a query
137
React is an open-source JavaScript library used for ____/
building user interfaces
138
What is a primary key in SQL?
A primary key is a column or a group of columns that is used to identify a row uniquely in a table
139
React uses a syntax extension of JavaScript called ____.
JSX
140
How are primary keys defined?
Through primary key constraints
141
The transpiler ____ is a popular tool for compiling JSX code into JavaScript
Babel
142
How many primary keys can a SQL table have?
one and only one
143
How many foreign keys can a SQL table have?
multiple
144
What is a foreign key in SQL?
A column that references the primary key of a different table.
145
In Sass, a mixin is called with the ____ directive.
@include
146
How do you change the name of a view in SQL?
ALTER VIEW old_name RENAME TO new_name;
147
In JSX, every element must be ____.
closed
148
How do you delete a view in SQL?
DROP VIEW name_of_view;
149
Everything in React is a ____.
component
150
In React, what is state?
An object that holds data that a component and its children need.
151
In NumPy, what is the general layout for how to index a two-dimensional array?
array[row,col] or array[row][col]
152
In JavaScript functions, the return statement causes the function to ____.
stop running
153
When you are testing equality in JavaScrip, you should almost always use ____.
the triple equal sign
154
In JavaScript, the only number that is falsy is ____.
zero
155
After an UPDATE command is performed in SQL, what other commands can be used to return the values of specified columns?
RETURNING
156
One of React's key principles is separating ____ from ____.
state logic | UI logic
157
What is the general syntax of the DELETE command in SQL?
DELETE FROM table_name | WHERE condition;
158
When using event listeners in JavaScript, what event measures the depression of a key on a physical keyboard?
keydown
159
JavaScript objects are similar to ____ in other languages.
dictionaries
160
What happens if the WHERE clauses is omitted from a DELETE statement in SQL?
The entire table is deleted! Don't do this!
161
In AWS S3, files are called ____ and folders are called ____.
objects, buckets
162
Write a basic dictionary in Python.
dictionary = {'key':'value'}
163
How do you go up one level in the command line?
cd ..
164
What does the 'ETS' in ETS Model stand for?
Error, Trend, Seasonality
165
What does EWMA stand for?
Exponentially Weighted Moving Average
166
What is the unique characteristic of an EWMA?
It places more weight on data points that occurred more recently.
167
What method in pandas allows us to calculate moving averages?
.rolling()
168
What method in pandas allows us to perform operations on all historical values of a time series?
.expanding()
169
What pandas method can be used to create exponentially weighted moving averages?
.ewm()
170
Given a JavaScript object carInfo with a key "year", what command assigns the value 2007 to the "year" key?
carInfo.year = 2007;
171
How do you comment in HTML?
start:
172
What three possible commands start every variable initialization command in JavaScript?
var, let, const
173
In HTML, the img tag's ____ attribute points to the image's URL.
src
174
JavaScript objects are ____ pairs.
key-value
175
How do you create a dead link in HTML?
176
JavaScript objects are not ____.
ordered
177
How can you create a text input in HTML?
178
If you leave it blank, the ORDER BY statement will use ____ by default.
ASC
179
Most of Bootstrap's classes can be applied to ____ elements.
div
180
In SQL, where is the LIMIT statement typically placed in a query?
at the end of the query
181
How do you make a button fill the width of a screen using Bootstrap?
class="btn-block"
182
For if statements in JavaScript, ____ are not required if the entire statement is on one line.
curly brackets
183
How do you import the seaborn library into Python?
import seaborn as sns
184
How do you import the Datetime library into Python?
from datetime import datetime
185
For an object in Python, what is an important difference between calling attributes versus calling methods?
methods have parentheses while attributes do not
186
What pandas function converts a string to a datetime object?
pd.to_datetime()
187
Given a DataFrame in pandas named df, how would you calculate 7-day moving averages of the data in the DataFrame?
df.rolling(7).mean()
188
What lines get added to a chart to create Bollinger bands?
20 day moving average 20 day MA + 2std 20 day MA - 2std
189
What does a kde plot stand for?
kernel density estimation
190
What is the poor naming convention associated with the datetime library?
Since the datetime library has a datetime method, you must sometimes call datetime.datetime()
191
Dictionaries do not retain ____.
order
192
In the command line, the ____ command causes a permanent delete and cannot be undone.
rm
193
In matplotlib, what does the alpha argument control?
the transparency of a line in a graph
194
How do you import the pandas library into Python?
import pandas as pd
195
How do you model exponential growth using linear regression?
use a log transformation
196
Write a JavaScript object using the 'var' declaration that describes the characteristics of a car.
``` var carInfo = { make: "Toyota", year: 1990 }; ```
197
What is the syntax for a DROP TABLE command in SQL?
DROP TABLE IF EXISTS table_name; | note the IF EXISTS clause is not required, but very useful
198
What command clears the JavaScript console?
clear()
199
What is the general syntax of the ALTER TABLE command in SQL?
ALTER TABLE table_name ACTION;
200
Given the JavaScript object myObject = {key:3}; how do you return 3?
myObject.key
201
What are the 5 main commands that can be used with the ALTER TABLE command in SQL?
``` ADD COLUMN DROP COLUMN RENAME COLUMN ADD CONSTRAINT RENAME TO ```
202
In Python, what is the easiest way to return the last item of a list called 'names'?
names[-1]
203
What shortcut clears the terminal?
CMD + K
204
Using aq colon, how could you return the first two elements of a list in Python?
List[0:2] This syntax returns UP TO BUT NOT INCLUDING the second element
205
What command creates a new folder in the terminal?
mkdir
206
What command would be used to create an index.html file using the command line?
touch index.html
207
Given a database connection called "conn" in psycopg2, how do you close the database connection?
conn.close()
208
In React, what is a stateless functional component?
Any function you write which accepts props and returns JSX.
209
When creating a table in SQL, what are the two main types of column constraints?
NOT NULL | UNIQUE
210
In the terminal, typing ____ allows you to open the vim editor.
vim
211
Typing ____ allows you to quit the vim editor.
:q
212
On the command line, the ____ function moves files from one directory into another. It can also be used to rename a file within the same directory.
mv
213
What is the general syntax for the UPDATE command in SQL?
UPDATE table_name SET column = value1 WhERE other_column = value2
214
____ is a JavaScript method used to prevent default behavior.
event.preventDefault()
215
Given an array named xyz in Python, how can we calculate the sum and standard deviation of its elements?
xyz. sum() | xyz. std()
216
The pandas library is named after ____.
panel-data
217
What is the name of the main Python library that works with SQL?
psycopg2
218
In JavaScript, what does npm stand for?
node package manager
219
In JavaScript, the only strings that are falsy are ____.
empty
220
The ____ shortcut allows you to access the currently-selected element in dev tools.
$0
221
Using anonymous functions with event listeners can be troublesome because ____
they cannot be unbound
222
In JavaScript, what is coercion?
when you use the bang operator to convert a non-boolean data type into a boolean
223
Error management in Python is usually implemented using three keywords: ____, ____, and ____
try except finally
224
____ allow us to search for specific patterns within code.
regular expressions
225
In Python, the ____ library allows for working with regular expressions.
re
226
What command prints a list of virtual environments in Anaconda?
conda info --envs
227
Given a venv named MyDjangoEnv, how do I activate the venv on MacOS? Assume using anaconda
source activate MyDjangoEnv
228
What command installs Django on an anaconda venv?
conda install django
229
Using the django-admin command line tool, how would you start a new Django project called firsr_project
django-admin startproject first_project
230
What character is used for concatenation in JavaScript?
+
231
In HTML, do id or class attributes have higher specificity?
id
232
When functions are defined in JavaScript, they always start with ____.
function
233
Three important properties control the space that surrounds each HTML element: ____
padding, margin, and border
234
What is the purpose of the DOM?
The DOM allows us to interface our JavaScript code to interact with HTML and CSS
235
In what order do browsers read CSS?
top to bottom
236
What does JSON stand for?
JavaScript Object Notation
237
In the console of a web browser, how can you use the DOM to return the URL of a website?
document.URL
238
How can you make sure that a style declaration is never overridden?
by adding '!important' to its declaration
239
In JavaScript, what is the difference between var and let?
var is function scoped and let is block scoped
240
How do you create a CSS variable?
give it a name with two dashes in front of it --var
241
Regular expressions are also known as ____ or ____
regex | regexp
242
List three possible events in JavaScript
Clicks Hovers Double Clicks
243
To make font bold in HTML, we can use the ____ tag
strong
244
What is the purpose of regular expressions?
to match parts of strings
245
In JavaScript, what event listener measures when you stop mousing over an element?
mouseout
246
In HTML, you can add a horizontal line across the page using the ____ tag.

(self-closing)
247
What is the comment character in Python?
#
248
What is the remainder (or mod) operator in Python?
%
249
How would you create a list called "letters" in Python that contains x, y, and z
letters = [x,y,z]
250
In Python, how would you add 4 to the end of a list called 'numbers'?
numbers.append(4)
251
Where should the tag be placed in an HTML document?
Just before the closing tag
252
What is the purpose of node.js?
Running JavaScript outside of the browser
253
What acronym can be used to memorize the different data types in JavaScript?
SNOB N US
254
How do you enable strict mode in JavaScript?
add 'use strict'; to the top of you tag
255
In JavaScript, var variables are ____ scoped
function
256
In Python, what is the main functional difference between tuples and lists?
tuples are immutable
257
In JavaScript, let and const variables are ____ scoped
block
258
In Python, what is the main syntax difference between tuples and lists?
Tuples use round brackets while lists use square brackets
259
Whatis the equality operator in Python?
==
260
If you want to run something every 5 seconds in JavaScript, you use a ____ command.
interval
261
When creating variables in JavaScript, it is a best practice to instantiate them as ___ by default.
const
262
Write an example of snake case
this_is_snake_case
263
In JavaScript, what is interpolation?
When you put a variable inside of a string
264
Write an example of string interpolation in JavaScript
`Hello, my name is ${name}` Note: backticks required
265
Given a JavaScript object called 'person', how would you return its age?
person.age
266
How do == and === differ in JavaScript?
=== tests for both value and type
267
What is the purpose of console.dir() in JavaScript?
it returns an object's properties instead of the object itself
268
Custom attributes in web development generally start with the ___ keyword.
data
269
How do you add an HTML element to a website using JavaScript?
document.createElement()
270
In Python, how would you return the second element of a list called my_list?
my_list[1]
271
In Python, a lambda function uses the ____ keyword instead of the def keyword.
lambda
272
In a React application, the components folder lies within the ____ folder.
src
273
The PRIMARY KEY constraint in SQL is a combination of the ___ and ___ constraints.
UNIQUE | NOT NULL
274
One of the most important topics in React is ____.
state
275
What command is used to add a row to a SQL table?
INSERT INTO
276
In React, the state property must be set to a JavaScript ____.
object
277
In JavaScript, a function without a name is called a ____ function.
anonymous
278
What is a method in JavaScript?
a function that is defined inside of an object
279
Using JavaScript, how would you add the class 'special' to an element named myParagraph?
myParagraph.classList.add('special')
280
What does XSS stand for?
cross-site scripting
281
All HTML elements are ____, but not all ____ are elements.
nodes | nodes
282
The ____ file tells Python which package versions are required to run a file.
requirements.txt
283
What does REST stand for in REST API?
Representational State Transfer
284
What does HTTP stand for?
HyperText Transfer Protocol
285
Twitter, Facebook, and Google all use _____ for authentification.
OAuth
286
How do you create a comment in SQL?
_ _
287
By convention, how do we import the psycopg2 library into Python?
import psycopg2 as pg2
288
The file ____ is the center of any Node.js project or npm package.
package.json
289
What command is often used to determine whether or not a JavaScript sheet is connected properly to an HTML document?
console.log("connected!"
290
What si the DRY principle?
Don't Repeat Yourself
291
In JavaScript, what regular expression flag allows you to ignore case?
i
292
What is jQuery?
A JavaScript library focused on interacting with the DOM and making HTTP requests.
293
What is an OBOE error?
Off By One Error
294
In JavaScript, the ____ function is useful for when you want to loop over some data and do something with that data.
forEach()
295
What does the .map() function do in JavaScript?
It applies the same operation to each element of an array.
296
Given an array called 'names' and a function called 'bosify', write a JavaScript command that would apply bosify to every element of names using the map function.
names.map(bosify)
297
Wes Bos recommends against using plus signs to concatenate strings because ____
it can be easily confused with mathematical arithmetic
298
How would you create a new Date object in JavaScript? Assume the variable name is 'birthday'.
const birthday = new Date()
299
What is an example of an easy way to get current datetime in JavaScript?
Date.now()
300
What website allows for the easy conversion between datetime and timestamps?
epoch.now.sh
301
When working with API calls in JavaScript, the ____ function is useful for massaging data to change it into a format that is useful for the user.
.map()
302
What does the .filter() function do in JavaScript?
it removes items from an array that do not meet a specified condition
303
In JavaScript, the .find() function is similar to the .filter() function except that ________
the .find() function only returns the first instance of the specified criterion, while the .filter() function returns all instances of the specified criterion also, .find() returns an item while .filter() returns an array
304
What is a higher order function?
A function that returns another function
305
What are the three most important array functions in JavaScript?
map, filter, and reduce
306
What are the two possible arguments for a .map() function in JavaScript?
accumulator | item
307
In JavaScript, the ____ command allows you to see all of the properties of a specified JavaScript object in the console.
console.dir(object)
308
Everything in JavaScript is an _____.
object
309
In JavaScript, the ___ syntax for creating objects does not use the 'new' keyword.
literal
310
The 'this' keyword is always ____ scoped.
function
311
Given a prototype named Pizza in JavaScript, how could you add a method to it named 'eat'?
Pizza.prototype.eat = function() { }
312
Why is it better to add methods to the prototype and not the constructor in JavaScript?
Because it allows all instances of the object to reference the prototype, saving code and making the appliaction run faster.
313
In JavaScript, ____, ____, and ____ are functions that are used to change the scope of what 'this' is equal to inside of a function.
bind, call, and apply
314
If you wanted to make the '$' a shortcut for 'document.queyrSelector' in JavaScript, how would you do so?
const $ = document.querySelector.bind(document)
315
JavaScript is a single-threaded language, which means ________.
only one process can be run at a time
316
Assume that you have navigated to a directory that contains a package.json file. How can you install all dependencies using the Node.js package manager?
npm install
317
What is a promise in JavaScript?
A promise is an object that may produce a single value some time in the future
318
What are the two possible outputs of a promise in JavaScript?
Resolve or reject
319
Promises in JavaScript are used to manage _____
The order of code completion
320
How do you catch an error within a promise in JavaScript?
by chaining a .catch() to the promise after the .then()
321
In JavaScript, what does the .then() method return?
a Promise
322
With Promise-built functions in JavaScript, you must almost always chain a ____ and a ____ onto the end.
.then() | .catch()
323
When chaining .then() statements to a JavaScript promise, do you need to also chain multiple .catch() statements?
No, one .catch() at the end will handle errors for all of the .then() statements
324
In JavaScript, you can only use async await inside of a function that is ____
marked async
325
In JavaScript, the await keyword can only be used inside of ____.
An async function
326
What is the await operator used for in JavaScript?
to wait for a Promise
327
Provide an example of how to create an async function in JavaScript
async function myFunction () { //function code goes here }
328
Is top-level usage of the 'await' keyword permitted in JavaScript?
No.
329
What is meant by top-level usage of the 'await' keyword?
Using 'await' outside of any function
330
What does mlab do?
MongoDB database-as-a-service
331
mlab was acquired by ____ and merged into _____
MongoDB | MongoDB Atlas
332
Provide an example of a GUI for MongoDB
MongoDB Compass
333
Express.js is a framework for _____
Node.js
334
Sensitive information like API tokens, passwords, and usernames are typically stored in a ____ file
variables.env
335
_______ files should not be pushed to your version control repository
variables.env
336
What is the purpose of the 'dotenv' library in JavaScript?
It allows you to access the contents of a variables.env file by access the properties of a 'process.env' object For example: process.env.DATABASE
337
In JavaScript, give an example of how you would connect to a database using the mongoose and dotenv libraries.
mongoose.connect(process.env.DATABASE)
338
Provide an example of how to require the express library and create a router using JavaScript
``` const express = require('express'); const router = express.Router(); ```
339
What JavaScript command is used to import an API call as a proper JavaScript object?
JSON.parse();
340
What does AJAX stand for?
Asynchronous JavaScript And XML
341
What tab in a browser's devtools shows all of the API calls performed by the browser?
the Network tab
342
How can you filter for just AJAX requests in a browser's devtools?
By clicking on the 'XHR' filter
343
What does XHR stand for?
XMLHttpRequest
344
There is a good database of public APIs available at _______.
github.com/public-apis/public-apis/
345
What does CORS stand for?
Cross Origin Resource Sharing
346
What does Babel do?
It transpiles modern JavaScript into JavaScript that is runable on older browsers
347
JavaScript modules have their own ___.
scope
348
JavaScript modules can only be run on ____.
a server
349
How can you install browser-sync at the command line?
npm install -g browser-sync
350
What does a minifier do?
It makes all of your code as small as possible by shortening variable names and eliminating dead code (defined as code that is never run) Example: replacing the variable 'options' with 'o'
351
What is webpack?
an open-source JavaScript module bundler
352
What command allows you to create a package.json file using the node package manager?
npm init
353
While installing modules using the node package manager, -D is the same as ____
--save-dev ^ two dashes at start of command
354
What does pwd stand for?
print working directory
355
In the command line, what does cd stand for?
change directory
356
In the command line, what does mkdir stand for?
Make directory
357
On the command line, the ____ command is used to create a new file
touch
358
How can you change your default shell to zsh on the command line?
chsh -s /bin/zsh
359
What is meant by a 'dirty' git repo?
It has modifications which have not been committed to the current branch
360
How do you navigate to your home directory using the command line?
cd ~
361
By default, most computers hide files that ____
start with a dot | Example: .zshrc
362
What file contains your zsh settings? Where is it located?
.zshrc located in your home directory
363
What is the echo command used for on the command line?
to print a string | It also allows for variable interpolation
364
How do you see your command history in bash?
By using the up arrow
365
Given a folder called 'directory', how would you delete it using the 'rm' command?
rm -r directory
366
How do you install the trash utility at the command line?
npm install --global trash or npm install --global trash-cli
367
What does the 'z' utility do on the command line?
Allows you to easily jump to you most popular folders
368
How do you return to your last directory using the z utility?
the '-' command
369
How can you force iTerm to recognize changes made to the .zshrc file?
By typing the following command: source ~/.zshrc
370
What is the purpose of the 'extract' plugin for zsh?
Unzipping .zip files and other compressed directories
371
How can you open your current directory in Finder from the command line?
By typing the following command: open .
372
What command in iTerm (and, presumably other terminal clients) scrolls you to the very bottom?
CMD+R
373
What command allows you to initialize a new git repository named 'demo' using the command line interface?
git init demo
374
What are the three local git states?
working directory staging area repository (.git folder)
375
Suppose you just created a README.md file in a git repository. How do you move the file from the working directory into the staging area?
git add README.md
376
What is a "staging area" in git?
The area between the working directory and the git repository
377
When implementing version control from the command line, it is considered a best practice to stay out of the ____ folder
.git | unless you know exactly what you are doing
378
How would you apply version control to an existing folder? Assume you have already navigated to this folder using the command line.
git init .
379
How do you split the terminal into a top and bottom pane using tmux?
C-b %
380
How do you split the terminal into a left and right pane using tmux?
C-b "
381
How do you initiate tmux from the command line?
tmux
382
How can you add all files from the current directory into the staging area?
git add .
383
How do you save and quit the vim editor?
:x
384
How do you quit the vim editor without saving?
:x!
385
How do you see a list of all commits in a repository from the command line?
git log
386
What command allows you to see the last commit as well as a diff showing all of the changes?
git show
387
How can you get a list of tracked files in git?
git ls-files
388
What is an express commit?
A commit that skips the staging area
389
What command implements a direct commit?
git commit -a
390
How do you unstage a change in git?
git reset
391
The git ____ command allows you to save custom commands under new names.
alias
392
Using git, how would you rename a file from example.txt to demo.txt?
git mv example.txt demo.txt
393
Logs are usually saved as ____ files
.log
394
What is the purpose of a .gitignore file?
It specifies characteristics of files that should be excluded from git add and git commit commands. Logs are a common example.
395
What does HEAD mean in git?
HEAD is a reference to the last commit in the currently checked-out branch.
396
What git command would allow you to create a new branch called 'updates' and switch to that branch?
git checkout -b updates
397
The ____ command is used to switch between branches in git.
checkout
398
How do you merge branches from the command line using git? Assume the branch is called 'updates'.
navigate to the master branch and run the following command: git merge updates
399
What are tags in git?
Labels that can be placed at any arbitrary commit point
400
What three files are recommended to be included in every GitHub repository?
README LICENSE .gitignore
401
How can you tell if you have no remote connection set up in git?
If the following command returns nothing: | git remove -v
402
By convention, the first and primary remote repository is named _____
origin
403
In a git repository, what is file extension for the license file?
.txt
404
The ____ directory contains all of our SSH related files
.ssh
405
What is vi?
A text editor that was originally created for the Unix operating system
406
What does vim stand for?
Vi + IMproved
407
What command allows you to enter insert mode in vim?
i
408
How do you leave insert mode and enter normal mode in vim?
The escape key
409
What command allows you to enter line mode from vim?
:
410
Normal mode in vim is sometimes called ____ mode
command
411
What are the three main modes in vim?
Normal mode Insert mode Line mode
412
What command in vim saves your changes and exits the file?
:wq | think of it as 'write quit'
413
How would you create a new file called "myFile.txt" using vim?
vim myFile.txt
414
How do you move down a line in vim?
j
415
How do you move up a line in vim?
k
416
How do you move to the right in vim?
l
417
How do you move to the left in vim?
h
418
How do you page down in vim?
CTRL+f
419
How do you page up in vim?
CTRL+b
420
What do tildes represent in vim?
Lines beyond the end of the actual file
421
What command allows you to move right by 1 word in vim?
w
422
What command allows you to move left by 1 word in vim?
b
423
What command moves your cursor to the top of the page in vim?
z + enter
424
CTRL+R in the command line is similar to ____ in vim
z + enter
425
How can you move your cursor to the beginning of the line in vim?
0 | zero, not O
426
What command allows you to move to the end of a line in vim?
$
427
How can you navigate to line 5 using vim?
5 gg
428
What is the difference between gg and G in vim?
if you do not specify a line number: gg moves you to the very top of a file G moves you to the very bottom of a file
429
What command allows you to see how many lines are in a file in vim?
CTRL+g
430
In vim, the ____ command is a more detailed version of the CTRL+g command
g CTRL+g
431
How do you enable the ruler in vim?
:set ruler
432
How do you disable the ruler in vim?
:set noruler
433
What command TOGGLES the ruler in vim?
:set ruler! The exclamation mark toggles settings that are modified with the 'set' command
434
What command deletes the test at your current cursor position in vim?
x
435
What command deletes the character to the left of your cursor in vim?
X | uppercase x
436
What command deletes a word in vim?
dw | stands for delete word
437
What command deletes the next 5 words in vim?
5dw
438
What does the 2d3w command do in vim?
Deletes 6 words
439
What are the three main functions of an exclamation mark in vim?
1. Force an action 2. Toggle a vim setting 3. Execute an external command
440
How do you open vim's help system?
:help
441
____ is a shortened version of the :help command in vim
:h
442
vim uses a concept called ____ where you can store cut and copied text
registers
443
How do you cut text in vim?
Using the dd command
444
How do you paste text in vim?
p
445
What are the two ways to paste in vim?
p places the text after your cursor | P places the text before your cursor
446
What is vim's unique nomenclature for cutting and pasting?
``` cut = delete copy = yank paste = put ```
447
What are the three most commonly-used types of registers in vim?
Unnamed Numbered Named
448
In vim, registers are preceded with ____
double quotes "
449
What commands can fill a register in vim?
d, c, s, x, and y
450
What is the purpose of the black hole register in vim?
To delete text without effecting existing registers
451
What hotkey is associated with the black hole register in vim?
"_
452
How would you append a line onto the j register in vim?
Jyy
453
What are the undo and redo commands in vim?
u | CTRL+R
454
How do you enter replace mode in vim?
SHIFT+R
455
How would you move your cursor to the next instance of a specific character in vim?
f then character
456
In vim, how can you enter insert mode below or above the current line?
``` o = below the current line O = above the current line ```
457
What does the '/' character do in vim?
It moves your cursor to the next matching string you specify
458
What character performs the case switch operation in vim?
~
459
What character performs the uppercase operation in vim?
gUw
460
What does 'daw' stand for in vim?
Delete a word
461
What does 'diw' stand for in vim?
Delete inner word
462
What are the three versions of visual mode in vim?
character-wise line-wise block-wise
463
How do you start character-wise visual mode in vim?
lowercase v
464
How do you start line-wise visual mode in vim?
uppercase V
465
How do you start block-wise visual mode in vim?
CTRL+n+v
466
Using the pip package manager, how can you tell what packages are installed from the command line?
pip list or pip3 list
467
What command can you use to create a new virtual environment in Python? Suppose the new environment is called new-environment.
python3 -m venv new-environment
468
Given a virtual environemnt called new-environment, how can we activate it from the command line?
source new-environment/bin/activate
469
What command lets you know which Python virtual environment is current running?
which python
470
How do you deactivate a virtual environment in Python?
deactivate
471
What is the common naming convention for virtual environments in Python projects?
Saving the environment in a folder called 'venv' within the projects' directory
472
How can you import all of the packages from a requirements.txt file in Python?
pip install -r requirements.txt The -r command means it will be expecting a reqiurements.txt file
473
Virtual environments should usually be included in the ____ file
.gitignore With that said, the requirements.txt should be included
474
How can you clone a GitHub repository using SSH?
git clone (SSH URL)
475
How do you pull in all changes to a local clone of a repository on GitHub?
git fetch
476
Performing a ____ prior to a GitHub push is considered a best practice.
fetch or a pull
477
In git, the ___ and ___ URLs are usually identical
push | fetch
478
Assume you've cloned a GitHub repo to your local machine, and someone has made modifications to the repository using the GitHub web application. What two commands allow you to (1) check for any new commits and (2) pull the new commits into your local clone of the repository?
1. git fetch | 2. git pull
479
Given a SHA-1 hash, how can you find more informaiton about that commit from the command line?
git show (SHA-1 hash)
480
What are gists used for?
sharing code snippets
481
What does npm install do?
Installs all of the dependencies specified in a package.json file.
482
How do you get a React app to begin working on port 3000?
npm start
483
How do you clone a gist to your local machine from GitHub?
The same way you clone a repository: git clone SSH-URL
484
Assuming you're working on the master branch and use default nomenclature, what command pushes local commits to GitHub?
git push origin master
485
What is the cleanest way to list files using the command line?
ls -al
486
How can you create a new branch on the command line, and then switch into that branch? Assume the new branch is called example-branch
git checkout -b example-branch
487
What is the purpose of the git checkout command?
To navigate between the branches created by a git branch.
488
How do you bold text in Markdown?
__this is bolded__ Double underscores
489
How are emoticons accessed in GitHub comments?
With the colon (:) character
490
Given a branch called example-branch, how would you merge it into master from the command line?
git merge example-branch Make sure this command is executed from the master branch
491
What is the LAMP stack?
Linux, Apache, MySQL and PHP
492
Anything you can execute on the command line you can put into a ____ script.
shell
493
What is shebang?
``` #! An inexact abbreviation of 'sharp' 'bang' ```
494
What follows the shebang operator in a shell script?
The interpreter to be used for that script.
495
By convention, shell variable names are ____
all uppercase
496
Provide an example of string interpolation within a shell script.
"I am ${MY_SHELL}ing on my keyboard"
497
What is the (highly) generalized syntax for a condition test within a shell script?
[ condition-to-test-for ]
498
Write a generalized example of an if statement within a shell script.
``` if [ condition-is-true ] then command 1 command 2 ... command N fi ```
499
How do if statements end in a shell script?
fi
500
Write a generalized example of an if else statement within a shell script.
``` if [ condition-is-true ] then command N else command N fi ```
501
Provide a generalized example of a for loop within a shell script.
``` for VARIABLE_NAME in ITEM_1 do command 1 ... command N done ```
502
How do you comment within a shell script?
#
503
When assigning variable names in a shell script, there should be no ______
spaces before or after the equals sign
504
Provide an example of variable assignment within a shell script.
VARIABLE_NAME="Value'
505
How do you make a string all lowercase in Python?
By using the .lower() method
506
What does 'origin' mean in git?
In Git, "origin" is a shorthand name for the remote repository that a project was originally cloned from. More precisely, it is used instead of that original repository's URL - and thereby makes referencing much easier.
507
How do you update all branches of a cloned repository in git?
git pull --all
508
In GitHub, releases and ____ are nearly synonymous.
tags
509
How does the count function work in Python?
The count() method returns the number of occurrences of an element in a list.
510
What is the best way to print numbers from 0 to 9 in Python?
for i in range(10): | print(i)
511
How can you generate a sorted array of a string's characters in Python?
sorted(string)
512
How can you transform a string into a list where every character is an item in the list? Assume you are working in Python.
splitString = list(string)
513
There is no null value in Python. Instead, there is ____
None
514
What command activates a virtual environment in Python?
source bin/activate
515
In Django, one of the main commands is ____
django-admin
516
How could you start a new Django project called trydjango?
django-admin startproject trydjango . The period is imporant otherwise you'll have an unnecessary directory layer
517
How can you start running a Django directory on a local server?
python3 manage.py runserver
518
In a Django's project's settings.py file, what is the BASE_DIR variable?
The directory of the Django project
519
When you deploy a Django project into production, the ___ variable should be set to False.
DEBUG
520
Django installed apps are similar to ______
react components
521
What does WSGI stand for?
Web Server Gateway Interface
522
A Django project pairs with a ___ database by default
SQLite
523
What command performs a database migration in Django?
python3 manage.py migrate
524
How do you create your first superuser in a Django app?
python3 manage.py createsuperuser
525
The root of a Django project is where the ___ file is contained
manage.py
526
How would you create a new app called blog in a Django project?
python3 manage.py startapp blog
527
What two commands should be run every time you make changes to a models.py file in a Django project?
python3 manage.py makemigrations | python3 manage.py migrate
528
how would you connect a variable to a text field in a Django database? Assume the variable is called 'title'
title = models.TextField()
529
What is a relative class import?
Importing a class from another file within the same parent folder.
530
Assume you created an app named "Product" in a Django project. How do you add it to the admin dashboard?
go into admin.py add 'from .models import Product' add 'admin.site.register(Product)'
531
How can you work on your Django project from the Python shell?
python3 manage.py shell
532
How could you create a new Product object in a Django project from the Python shell?
Product.objects.create(variables)
533
Whenever you create a new app within a Django project, you should add it to ____
INSTALLED_APPS within the settings.py file
534
What is *args in Python?
The special syntax *args in function definitions in python is used to pass a variable number of arguments to a function.
535
What is **kwargs in Python?
The special syntax **kwargs in function definitions in python is used to pass a keyworded, variable-length argument list.
536
What does REPL stand for?
read-evaluate-print-loop
537
What does it mean to serialize something?
to serialize something is to convert a rich object (like an instantiated class that you use inside an application) into one long structured string so that you can send it over an HTTP request. then on the other end, the client can convert it back into a rich object
538
To create a page in a Django project, you must create a function that returns ____.
HttpResponse(html goes here)
539
What is a best practice name for the folder that acts as the root of a Django project?
src
540
In a Django project, each template corresponds to ____.
A page on the website
541
What is the best practice filename for the HTML document that all templates inherit from in a Django project?
base.html
542
In a Django project, the base.html file must be ____
an actual formal HTML document
543
What wrapper sits around templates in a Django project?
{% block content %} {% endblock %} Note - 'content' can be replaced with other blocks like script, title, etc
544
What statement must be at the top of every page in a Django project?
{% extends 'base.html' %}
545
What are the two possible syntaxes for closing a wrapper block in a Django template?
{% endblock %} {% endblock content %} note - content can be replaced
546
How can you include a template as an interpolation in a different Django template? Assume the template to be interpolated is called navbar.html
{% include 'navbar.html' %}
547
What is context in a Django project?
It is a key-value pair that allows you to embed {{ key }} in the Django template, while the website renders the value from the dictionary
548
How do you embed context within a Django template?
{{ context }}
549
What is one notable way that Django for loops are different from Python for loops?
Django for loops must be closed. Example: {% for item in items %}
  • {{ item }}
  • {% endfor %}
    550
    What is one notable way that Django if statements are different from Python for loops?
    Django if statements must be closed. Example: {% if abc == 123 %} print('yes') {% endif %}
    551
    What syntax is noticeably used in Django template tags?
    The { character
    552
    Django filters are implemented using what character?
    The pipe operator
    553
    What does the dir() functino do in Python?
    Returns a list of the attributes and methods of the object passed into it
    554
    In a Django project's views.py file, each function's return statement follows what format?
    return render(request, template.html, {context})
    555
    How do you import Django's forms library?
    from django import forms
    556
    Django's built-in ___ function renders out a form using

    tags

    .as_p
    557
    What does Django ORM stand for?
    Object Relational Mapper
    558
    What HTTP method is default for an HTML form?
    GET
    559
    How can you set up a Google search on your website?
    Use an HTTP GET method with action='http://www.google.com/search' and input name='q'
    560
    In an HTML form, what does the 'action' field do?
    It sends the browser to that URL upon completion of the form.
    561
    Which HTTP request is used for saving information to a database?
    POST
    562
    Django has a nice suite of ___ for HTML forms.
    validation techniques
    563
    What is a model in Django?
    A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you're storing. Generally, each model maps to a single database table.
    564
    What is django.shortcuts?
    The package django.shortcuts collects helper functions and classes that “span” multiple levels of MVC.
    565
    What function redirects a Django project to a 404 error page is a database entry cannot be found?
    get_object_or_404
    566
    In a Django project, how could you get a list of all the entries in a database table called Product?
    queryset = Product.objects.all()
    567
    The ____ function allows you to have subfolders for directories on a website (like /products/)
    includes()
    568
    By default, the HTTP protocol is served on port ____ of the web server (although this can be modified).
    80
    569
    HTTP status ___ means a request has been served successfully.
    200
    570
    Nginx is easily able to serve rising levels of ____ requests.
    concurrent
    571
    What is a reverse proxy?
    A reverse proxy is a service that stands between the client and the web servers. It receives the request from the client and sends it on its behalf to the web servers behind it.
    572
    What does SSL stand for?
    Secure sockets layer
    573
    Most of the time you will see Nginx working side-by-side with ____.
    Apache
    574
    Having multiple ____ web servers in the backend and using one or more ____ servers in front of them as a reverse proxy will give you the best of both worlds.
    Apache | Nginx
    575
    What are the two methods for installing Nginx?
    1. Download it and install the percompiled binaries | 2. Compile it from source
    576
    What is Lynx?
    A text-based web browser
    577
    What is Wget?
    A tool used to download files from the Internet using HTTP, HTTPS, or FTP
    578
    What are the 4 main HTTP methods?
    GET POST PUT DELETE
    579
    The ____ HTTP method is typically used to fetch data from a server.
    GET
    580
    The ____ and ____ HTTP methods are used to create and update resources in a database.
    PUT | POST
    581
    What are the main differences between the PUT and POST HTTP methods?
    POST should be used to create content | PUT should be used to update content
    582
    Name the 'safe' HTTP methods.
    GET
    583
    Name the 'unsafe' HTTP methods.
    PUT, POST, DELETE
    584
    When it comes to HTTP methods, which methods are considered idempotent?
    PUT and DELETE
    585
    What does idempotent mean when it comes to HTTP methods?
    Multiple executions of an HTTP request will only change the backend database once
    586
    Of the unsafe HTTP methods, which method is not idempotent?
    POST
    587
    What is REST-ful routing?
    Given a collection of records on a server, there should be a uniform URL and HTTP request method used to utilize that collection of records.
    588
    Provide an example of a RESTful URL naming convention
    //:id
    589
    What are the three situations were RESTful routing tends to fall short?
    1. Heavily nested relationships 2. Too many HTTP requests 3. Overfetching data (fetching data that is not required)
    590
    ____ is a pre-built application authored by the GraphQL team made solely for development purposes.
    GraphiQL
    591
    What are the four main packages required to install express to work with GraphQL?
    express express-graphql graphql lodash
    592
    ____ is a package that acts as a compatability layer between Express and GraphQL.
    express-graphql
    593
    In a GraphQL application, ____ is the file where all of the logic related to Express side of the application will live.
    server.js
    594
    _____ is an excellent software tool for creating educational charts and visuals
    Balsamiq Mockups
    595
    The ____ file tells GraphQL what your data looks like and what properties are contained within it.
    schema.js
    596
    What should always be the first line in a GraphQL schema.js file?
    const graphql = require('graphql');
    597
    What is the GraphQL data type for a string?
    GraphQLString
    598
    What is the GraphQL data type for an integer?
    GraphQLInt
    599
    What is a class method in Python?
    A class method is a method which is bound to the class and not the object of the class.
    600
    What does the leading single underscore mean in Python?
    It is a hint that the variable/method is intended for internal use only
    601
    When is the trailing underscore used in Python?
    To avoid conflicts with existing Python keywords class_ is an example
    602
    What is the purpose of a lone backslash in Python?
    A backslash at the end of a line tells Python to extend the current logical line over across to the next physical line.
    603
    What does it mean when a string literal is preceded by the character r in Python?
    The r means that the string is to be treated as a raw string, which means all escape codes will be ignored.
    604
    What does the dj-stripe module do in Python?
    dj-stripe implements all of the Stripe models, for Django
    605
    What is the purpose of the requests ilbrary in Python?
    The requests library is the de facto standard for making HTTP requests in Python.
    606
    How can you tell which version of node is installed on your computer at the command line?
    Type node -v
    607
    How can you start a development server using the node package manager?
    npm start
    608
    create-react-app runs ____ under the hood
    Webpack
    609
    How do you import React into a .js file, assuming that it was installed from your package.json using npm install?
    import React from 'react'
    610
    Assume that you are creating a new React component called StorePicker, and you have imported React into your .js folder using the command 'import React from 'react''. How would you create the component?
    class StorePicker extends React.Component{ }
    611
    What is the purpose of a .gitkeep file?
    People who want to track empty directories in Git have created the convention of putting files called .gitkeep in these directories.
    612
    JSX uses ____ instead of "class"
    className
    613
    Using JSX, you can only ever render ____ element(s).
    one
    614
    If you'd like to render adjacent elements in a React component, you can wrap them in ____ tags.
    615
    React props are similar to HTML ____.
    attributes
    616
    Are there predetermined names for React props?
    No, you can literally just make them up
    617
    What is the syntax for any type of React prop that is not a string?
    prop={500}
    618
    What is the purpose of curly brackets in JSX?
    To embed JavaScript snippets within the HTML block
    619
    In a React component's file (say, Component.js), how would you embed a prop called 'tagline' into an HTML block?
    this.props.tagline
    620
    What does the $ do in devtools?
    You can use $0 to select the last element you selected, $1 for the second last, etc.
    621
    In React, you can view what 'this' is by typing in ___ in the devtools console.
    $r
    622
    What is the best practice syntax for a stateless functional component?
    arrows function & implicit return
    623
    In JavaScript functions, what is the difference between 'normal' export and 'export default'?
    A normal export must be imported with curly brackets, like this: import { getFunName } from '../helpers';
    624
    The router in React is a _____
    component
    625
    The React router is similar to the ____ file in a Django project
    urls.py
    626
    What is the purpose of a SyntheticEvent in React?
    To ensure that the event functions properly across all browsers and platforms
    627
    How would you call a function called "handleClick" in an HTML element within a React component?
    Click me!
    628
    What is the 'golden rule' of React?
    Don't touch the DOM
    629
    How do you create an empty ref in a React component? Assume it is called 'myInput'.
    myInput = React.createRef();
    630
    When implementing the constructor for a React.Component subclass, you should call ____ before any other statement.
    super(props)
    631
    If you need to access 'this' within a React component's method, what are the two options available to you?
    1. use the constructor method at the beginning of the Component 2. define the method as a prop assigned to an arrow function
    632
    What is the purpose of 'push state' in React?
    Change the page's appearance without refreshing the browser
    633
    In React, ____ is an object that holds data that itself needs and its children may need.
    state
    634
    When it comes to React state management, you can't pass data ____, but you can always pass data ____.
    up | down
    635
    What is a linter?
    lint, or a linter, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
    636
    When accessing data in state, it is considered a best practice to first create ____
    a copy - to avoid mutating the original state
    637
    How can you merge two dictionaries into a single dictionary using a single expression? Use Python.
    z = {**x, **y}
    638
    What is the MERN stack?
    Mongo, Express, React, and Node.js