JavaScript Flashcards

1
Q

what does the console keyword refer to?

A

an object, collection of data and actions that can be used in our code

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

how do you print in javascript?

A

console.log( ) ;

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

how do you write a single line comment in JavaScript?

A

with two forward dashes //

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

How do you write a multi-line comment in JavaScript?

A

/ *

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

What are data types?

A

classifications given to different kinds of data used in programming

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

What are the 8 fundamental data types in JavaScript?

A

number (any number, including decimals)

string (any grouping of characters surrounded by single quotes) (string can be thought of as a fancy word for text)

boolean: data type with only two values - true or false
null: intentional absence of a value
undefined: also represents absence of a value, with different uses to null
symbol: unique identifiers
object: collections of related data

BigInt: represents integers of arbitrary length

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

What are the data types number, string, boolean, null, undefined, and symbol referred to as?

A

primitive data types - the most basic data types in the JavaScript language

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

What is the difference between using console.log() to print numbers and text

A

text needs quotation marks around it within the brackets of console.log() whereas numbers do not

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

What is an operator in JavaScript?

A

a character that performs a task in the code

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

Give some arithmetic operators

A
\+ add
- subtract
* multiply
/ divide 
% remainder
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the remainder operator sometimes called?

A

modulo (although it’s not quite a modulo)

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

What does the remainder operator do?

A

prints the remainder (returns the number that remains after the right hand number divides into the left hand number

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

What is the process of appending one string to another called?

A

concatenation

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

What property stores the number of characters in a string?

A

length

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

What are methods?

A

actions we can perform

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

What does math.floor() do?

A

takes a decimal and rounds it to the nearest whole number

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

what does math.random() do?

A

generates a random number between 0 to 1

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

What is a variable?

A

a container for a value that is stored in the computer’s memory
named storage for data

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

What can you do with variables?

A

create a variable with a descriptive name
store or update information stored in a variable
reference or ‘get’ information stored in a variable

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

what keywords can you use to declare variables?

A

let and const

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

What is the conventional way of capitalising in JavaScript called?

A

Camel Casing

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

How does camel casing work?

A

all words are grouped into one long word, the first word is not capitalised, then every word that follows is capitalised

myName
camelCaseEverything

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

what is the operator ‘ = ‘ called?

A

the assignment operator

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

what does the assignment operator do?

A

it assigns a value to a variable

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

Can variable names start with numbers?

A

no

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

are variable names case sensitive?

A

yes

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

can variable names be the same as keywords?

A

no

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

what does the let keyword signal?

A

that a variable can be reassigned a different value

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

what happens if you don’t give a variable a value?

A

it automatically has a value of undefined

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

what is different about the variable const compared to let

A

a const variable (short for constant) cannot be reassigned another value, and must be assigned a value when declared

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

What is the increment operator and what does it do?

A

the increment operator is ++ and it increases the value of the variable by 1

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

What is the decrement operator and what does it do?

A

the decrement operator is – and it decreases the value of a variable by 1

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

what does interpolate mean?

A

insert

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

What can you use the typeof operator for?

A

to check the data type of a variable

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

What is a code block / block statement indicated by in JavaScript?

A

curly brackets { }

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

What is this comparison operator? ‘ === ‘

A

the identity operator

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

What do all comparison statements evaluate to?

A

true or false

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

What are all comparison operators made up of?

A

two values that will be compared

an operator that separates and compares the values

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

What are the operators that work with booleans called?

A

logical operators

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

What are the 3 logical operators?

A

&& - the and operators
|| - the or operator, also called the pipe operator
! - the not operator, also known the bang operator

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

When would you use the && (the and) operator?

A

to check if two things are true

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

What can you do if only one condition needs to be true?

A

the || (pipe / or operator)

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

What does the ! (bang, not) operator do?

A

reverses/negates the value of a boolean

take a true or false value and return the opposite

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

What values are falsy?

A

0, empty strings, null, undefined, NaN (not a number)

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

When does JavaScript assign a truthy value in a boolean condition?

A

when you use the || pipe operator

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

What is short-circuit evaluation?

A

the semantics of boolean operators in which the second argument is executed or evaluated only if the first argument does not suffice

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

What is a (conditional) ternary operator?

A

operator that takes 3 operands:
a condition, followed by a question mark ?, then an expression to execute if the condition is truthy followed by a colon, followed by an expression to excute if the condition is falsy

isNightTime ? console.log(‘turn on the lights’) : console.log(‘turn off the lights’);

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

Where does the ‘else if’ statement go?

A

After the if statement and before the else statement(s)

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

What can you use instead of a long list of ‘else if’ statements

A

switch

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

What should finish a case clause within switch?

A

break;

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

What is the syntax for switch?

A
switch (\_\_) {
 case '\_\_\_':
   console.log('\_\_\_\_');
   break;
 //as many cases as need
default:
 console.log('\_\_\_');
break;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

what is a function?

A

a reusable block of code that groups together a sequence of statements to perform a specific task

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

give a way to create a function

A

with a function declaration

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

what does a function consist of?

A

the function keyword, the name of the function / its identifier followed by parentheses, a function body - the block of statements required to perform a task and enclosed in curly brackets

keyword identifier ( ) {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

what is the hoisting?

A

it allows access to declarations before they’re defined

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

is hoisting good practice?

A

no

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

when is the code inside a function executed

A

when it is called

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

How do you call a function?

A

type the function name followed by parentheses

functionName ()

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

what do the parameters of a function do?

A

allow functions to accept input(s) and perform a task using those inputs
they are treated like variables within a function

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

parameters act as ___ for values inside a function

A

placeholders

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

when calling a function with parameters, we ___ the values in the parameters

A

specify

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

values that are passed to the function when it is called are called ___

A

arguments

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

how can arguments be passed to a function

A

as values (eg numbers) or as variables (eg recWidth, recHeight)

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

what do default parameters do?

A

allow parameters to have a predetermined value in case there is no argument passed into the function / or if the argument is undefined when called

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

how do you pass back information from a function call?

A

with return, followed by the value you want to return

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

what happens if the value is omitted from return?

A

undefined is returned instead of the value wanted

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

what do you call functions being called within another function?

A

helper functions

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

what is usually omitted in a function expression?

A

function name

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

what is a function with no name called?

A

an anonymous function

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

how do you define a function inside an expression?

A

with the function keyword

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

what is the fat arrow notation?

A

=>

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

what do arrow functions do?

A

remove the need to type out the keyword function every time you need to create a function

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

how do you use and write functions with the arrow function?

A

include your function parameters inside brackets ( ) and then add a fat arrow => that points to the function body {
}

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

when are parentheses required with function parameters?

A

when the function has more than one parameter

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

does a one line function need curly braces?

A

no

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

what is an implicit return?

A

when a single line function follow the fat arrow notation, removing the need for the return keyword

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

What is initialization?

A

assigning an initial value to a variable

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

What is common practice when assigning constant variables?

A

naming the variable in all uppercase, with an underscore between words

const FAV_PET =

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

what are the limits on variable naming?

A

a variable name cannot start with a digit, and must be named with letters, digits, or the symbols $ or _

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

how are arrays written?

A

inside square brackets [ ]

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

array indexes are __ based?

A

zero based, meaning that the first item is 0, second is 1, and so on

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

how are JS objects written?

A

with curly brackets {

}

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

what are function arguments?

A

values received by the function when it is invoked / called

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

what happens to a function when JS reaches a return statement?

A

the function stops executing

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

what operator invokes/calls a function?

A

the parentheses operator ( )

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

what are local variables?

A

variables declared within a function

87
Q

what does it mean that JavaScript is dynamically types?

A

that there are different types of data within the .js language, but that variables are not bound to any specific type of data

88
Q

double and single quotes are ___ quotes

A

simple quotes

89
Q

backtick quotes are ___ quote

A

extended functionality quotes

90
Q

what is a JS expression?

A

a snippet of code that evaluates to a value

91
Q

what is a JS expression?

A

a snippet of code that performs an action

92
Q

when you write a JS function, all the arguments must be ___, not ___

A

all arguments must be expressions, not statements

93
Q

what shows a template literal in JS?

A

backticks

94
Q

what are the three methods for extracting part of a string?

A

slice (start, end)
substring (start, end)
substr (start, end)

95
Q

what does slice ( ) do?

A

extracts part of a string and returns the expected part in a new string

96
Q

what parameters does slice ( ) take?

A

start position and end position

97
Q

what is the difference between slice( ) and substring( )

A

slice can take negative numbers as parameters, whereas substring cannot

98
Q

what happens if you miss out the second parameter of substring( )

A

it will cut out the rest of the string from the position of the first parameter

99
Q

what does trim( ) do?

A

removes whitespace from either side within a string

100
Q

all comparison operators return a ___ value

A

boolean

101
Q

for boolean values, true becomes ___

A

1

102
Q

for boolean values, false becomes ___

A

0

103
Q

=== is a ___ equality operator

A

=== is a strict equality operator

104
Q

== is an ___ operator

A

== is an equality operator

105
Q

when converted to a number, null becomes ___

A

null becomes 0 when converted to a number

106
Q

when converted to a number, undefined becomes ___

A

undefined becomes NaN (not a number) when converted to a number

107
Q

comparisons convert null to a __

A

comparisons convert null to a number (0)

108
Q

what does an if statement need after it

A
brackets
if ( ) {
}
109
Q

what are the four logical operators

A

|| or
&& and
! not
?? nullish coalescing

110
Q

&& (AND) returns the first __ value, and || (OR) returns the first ___ value

A

&& (AND) returns the first falsy value, and || (OR) returns the first truthy value

111
Q

the precedence of AND && operator is __ than OR ||

A

the precedence of AND && operator is higher than OR ||

112
Q

the precedence of ! NOT is the ___ of all logical operators

A

the precedence of ! NOT is the highest of all logical operators

113
Q

any value that is not false, undefined, null, 0, NaN, or an empty string ‘’ returns ___ when tested as a conditional statement

A

returns true

114
Q

what is another word for function parameters?

A

argument (also properties and attributes)

115
Q

how do you specify multiple arguments / parameters within a function

A

separate them with comments

116
Q

how do you give a default parameter / argument to a function

A

by adding = after the name of the function

function hello ( name = ‘Chris’)

117
Q

when do you often see anonymous functions?

A

when the (anonymous) function expects to receive another function as a parameter

118
Q

what is scope?

A

scope defines where variables can be accessed or referenced

119
Q

what is a block?

A

the code inside a set of curly braces { }

120
Q

when you declare global variables, they go to the ___ ____

A

global namespace

121
Q

what is scope pollution?

A

when too many global variables exist in the global namespace, or when variables are reused across different scopes

122
Q

it’s best practice to define variables in the global scope, true or false?

A

false

it’s best practice to NOT define variables in the global scope.

123
Q

why should you tightly scope your code?

A
  • makes code more legible
  • makes code more understandable
  • makes code easier to maintain
  • saves memory in code
124
Q

what is an array represented by?

A

square brackets [ ]

125
Q

what are the contents inside arrays called?

A

elements

126
Q

what might the .push method also be referred to as?

A

a destructive array method

127
Q

what is pass by reference?

A

when you pass an array into a function, if the array is mutated inside the function, that change will be maintained outside the function as well

128
Q

are elements declared within an array with a const variable mutable or constant

A

the elements within the array assigned to const variable are mutable
the elements within the array itself are mutable

129
Q

if an array is passed through a function and mutated, is the mutation maintained outside the function?

A

yes

130
Q

what is an array stored within another array called?

A

a nested array

131
Q

how can you iterate a for loop through an array?

A

use the array’s .length property in the loop’s condition

132
Q

in loop variable naming convention, what does i stand for

A

index

133
Q

give a use for nested loops

A

to compare elements in two arrays

134
Q

how does a nested loop execute?

A

for each round/iteration of the outer loop, the inner/nested loop will run completely

135
Q

what does a do… while statement do?

A

executes a task once then keeps doing that task until condition is met

136
Q

how is do… while different to a while loop?

A

a do while statement will run at least once regardless of whether the condition evaluates to true

137
Q

what is a high-order function?

A

functions that accept other functions as arguments and/or return functions as output

138
Q

what do arrow functions do?

A

remove the need to type function every time you create a function

139
Q

in JavaScript, functions are __ class objects

A

first class objects

140
Q

what does it mean that functions are first class objects?

A

JS functions can have properties and methods

141
Q

what is a parameter in a function?

A

a placeholder for the data that gets passed into the function

142
Q

what are functions that get passed into other functions as parameters called?

A

callback functions

143
Q

what are iteration methods?

A

built-in JavaScript array methods that help us iterate

144
Q

what are iterators?

A

methods called on arrays to manipulate elements and return values

145
Q

what notation is used to designate an object literal?

A

{ } curly brackets

146
Q

how is the data organised in JS objects?

A

in key-value pairs

147
Q

what is a key in a key value pair?

A

it’s like a variable name that points to a location in memory that holds a value

148
Q

what can a key’s value be?

A

any data type in the languages (including functions or other objects)

149
Q

what is a key’s name known as?

A

its identifier

150
Q

what is returned if you try to access a property that does not exist on an object?

A

undefined is returned

151
Q

how do you access an object’s property?

A

with dot notation (object.property) or with bracket notation [ ]

152
Q

when must you use bracket notation over dot notation for accessing an object’s property?

A

when accessing keys that have numbers, spaces or special characters

153
Q

are objects mutable or immutable?

A

mutable

154
Q

when the data stored on an object is a function, that is called a __

A

method

155
Q

a property is what an object ___

a method is what an object ___

A

has

does

156
Q

how are object methods invoked?

A

by appending the object’s name with the dot operator followed by the method name and parentheses

key.method( );

157
Q

what does it mean that objects are passed by reference?

A

when we pass a variable assigned to an object into a function as an argument, the computer interprets the parameter name as pointing to the space in memory holding that object

158
Q

what is the result of objects being passed by reference?

A

functions which change object properties mutate the object permanently - even if the object is assigned to to a const variable

159
Q

what does the for… in syntax do?

A

will execute a given block of code for each property in an object

160
Q

are arrays objects?

A

yes

161
Q

what does the this keyword do?

A

references the calling object which provides access to the calling object’s properties

162
Q

for a method, the calling object is the object the method ___ to

A

belongs to

163
Q

what happens if you use the this keyword in a method?

A

the value of this becomes to calling object

164
Q

arrow functions inherently __ an already defined __ value to the function itself that is not the calling object

A

bind

this

165
Q

should you use arrow functions when using this in a method?

A

no! avoid!

166
Q

what is privacy in objects?

A

the idea that only certain object properties should be mutable or able to change in value

167
Q

does JavaScript have built in privacy for objects?

A

no

168
Q

what is the naming convention for indicating that an object property should not be altered?

A

placing an underscore at the start of the property name (should prepend the property name)
_propertyName

169
Q

what are getters?

A

getters are methods that get and return the internal properties of an object

170
Q

what do setter methods do?

A

safely reassign values of existing properties within an object

171
Q

in general, do getters need to be called with parentheses?

A

no

172
Q

what is a factory function?

A

a function that returns an object and can be used to make multiple object instances

173
Q

what is destructuring?

A

shortcuts for assigning properties to variables

174
Q

how do you create destructured assignment with objects?

A

create a variable with the name of an object’s key wrapped in curly brackets and assign it to the object
const { object_key } = ___

175
Q

what is called every time a new instance of a class is created?

A

the constructor( ) method

176
Q

what is the difference between class and object syntax?

A

the constructor method (for classes)

177
Q

what is an instance?

A

an object that contains property names and methods of class, but with unique property values

178
Q

how the syntax for class methods and getters different from object syntax for methods and getters?

A

you can’t use commas between class methods

179
Q

is the syntax for calling methods and getters on an instance the same as calling them on an object?

A

yes

180
Q

what is a parent class also known as?

A

a superclass

181
Q

what are child classes also known as?

A

subclasses

182
Q

when are classes candidates for inheritance?

A

when multiple classes share properties or methods

183
Q

what does the super keyword do?

A

calls the constructor of the parent class

184
Q

how do you avoid reference errors when creating classes using inheritance?

A

always call the super keyword method before using the this keyword

185
Q

where is the super keyword placed in best practice?

A

on the first line of subclass constructors

186
Q

what happens when extends is called on a class declaration?

A

all of the parent methods are available to that child class

187
Q

can child classes have their own properties, getters, setters, and methods outside of those they inherit?

A

yes

188
Q

what are static methods?

A

methods that aren’t available in individual instances, but that can be called directly from the class

189
Q

you cannot call static methods on a ___

A

instance

190
Q

how do you define a class?

A

using a class declaration

191
Q

in what HTML element is JavaScript encapsulated in?

A

< script >

192
Q

what happens when an HTML parser comes across JavaScript

A

it stops to load the JS content before parsing the rest of the HTML

193
Q

what are web events?

A

user interactions and browser manipulations that you can program to trigger functionality

194
Q

what is the returned value of a function without a return statement?

A

undefined

195
Q

what is a queue in computer science?

A

an abstract data structure where items are kept in order

196
Q

what do comparison operators return?

A

a boolean true or false

197
Q

what is the difference between === and ==

A
=== is strict equality
== is the equality operator
198
Q

if values being compared by a strict equality operator have different types, they are considered ___

A

unequal (will return false)

199
Q

what happens when values being compared by the equality operator (==) are not the same type?

A

the equality operator performs a type conversion and the evaluates the values

200
Q

what is this !== operator called

A

the strict inequality operator

201
Q

what is this operator: | |

A

the logical or operator

202
Q

what does the logical or operator ( ||) do?

A

returns true if either of the operands is true, otherwise it returns false

203
Q

what do switch statements do?

A

they test a value and can have many case statements which define various possible values - statements are executed from the first matched case value until a break is encountered

204
Q

how are case values tested in a switch statement?

A

with strict equality (===)

205
Q

what does a default statement within a switch statement do?

A

the default statement is executed if no matching case statements are fond

206
Q

where should the default statement go in a switch statement?

A

at the end (like an else statement)

207
Q

what happens when a return statement is reached within a function?

A

the execution of the current function stops

208
Q

how do you separate items within an object

A

with a comma ,

209
Q

how many instances of a class does querySelector return?

A

just one

210
Q

What would you use if you wanted to select all instances of something in DOM?

A

querySelectorAll

211
Q

What is nodeList?

A

collections of nodes

212
Q

what is a node?

A

a node is an abstract base class upon which many other DOM API objects are based - letting those object types to be used similarly and often interchangeably

213
Q

what happens if you set setTimeout to 0

A

it still causes the event to be asynchronous