Javascript Primitives and Variables Flashcards

1
Q

How do you update the value of a variable in Javascript?

A

variableName = newValue;

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

What is the difference between null and undefined?

A

Null is an intentional non-existent value. Undefined has just not been assigned a value yet.

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

Why is it a good habit to include labels when you log values to the browsers console?

A

Debugging and readability

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