The Basics Flashcards

1
Q

What data type is the following

1

A

Number

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

What data type is the following

5.283

A

Number

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

What data type is the following

“4”

A

String

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

What data type is the following

False

A

Boolean

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

Which variable statement allows only one assignment, but underlying values can be changed

A

const

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

What is the scope of a var variable? Will declaring a var twice trigger an error? Will declaring a var twice trigger an error in strict mode?

A

The scope of a variable declared with var is its current execution context and closures thereof, which is either the enclosing function and functions declared within it, or, for variables declared outside any function, global. Duplicate variable declarations using var will not trigger an error, even in strict mode, and the variable will not lose its value, unless another assignment is performed.

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

What basic data types are available for Javascript?

A

Boolean, String, Number

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

What is the difference between === and ==?

A

=== is strict equality vs. == equality. Strings and Numbers in strict equality will be seen as false. i.e. 1==="1" would be false, but 1=="1" would be true.

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

Which variable delcaration is safest to use?

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

What is an expression?

A

A block of code that evaluates to a value.

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

What is a statement?

A

A block of code that performs some kind of action.

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