Javascript Flashcards

0
Q

Define a variable in JavaScript.

A

var i = 1;

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

When would want to use the === evaluator as opposed to ==?

A

When want to prevent automatic type conversion

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

What’s an Object?

A

Collection of properties
(Properties called by a dot or a square bracket)
Eg. Math.min();

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

What’s a Method?

A

A property that calls a function.

Eg. array.pop();

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

How are objects created?

A
Create variable
Enclose in Curley braces. 
Separate key value properties by commas. 
Eg. var objectName = {
  key:value,
  key2:[1, 2, 3]
};
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Reading a property that doesn’t exist will produce what value?

A

undefined

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

What Math property rounds down?

A

Math.floor

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

What Math property rounds up (to the nearest whole number)?

A

Math.ceil

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

What Math property rounds to the Nearest whole number?

A

Math.round

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