Intro to JS Flashcards

1
Q

Truthy

A

values that are evaluated as true in a Boolean context

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

Falsy

A

values that are evaluated as false in a Boolean context

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

Automatic Semicolon Insertion (ASI)

A

TBD

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

Type Coercion

A

TBD

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

Expression

A

code that returns a value

4 + 5; myVariable; Math.random();

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

Statement

A

code that performs an action

if..else; try…catch; switch;

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

hoisting: functions

A

yes

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

hoisting: variables

A

also yes, but in lines before attribution will evaluate to undefined

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

undefined

A

placeholder for a (assumed) future value;
the air inside a container before the container is used

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

Number.isNaN or isNan

A

Number.isNaN
isNan(“string”) === true

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

globalThis

A

reference to the global this (window)

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

try..catch block has ? many components

A

try {…} catch(err) {…} finally {…}

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

if there are 2 try..catch..finally, one nested, what happens if the inner catch throws an error and inner finally returns a value

A

outer catch will not ‘catch’ error thrown by inner catch

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try…catch#returning_from_a_finally-block

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