Data Types Flashcards

1
Q

What type of data can javascript variable hold?

A

numbers, strings, objects and more

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

What happens when you add a number to a string?

A

JavaScript will treat the number as a string

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

How does JS evaluate an expression

A

from left to right

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

What type are in JS?

A

dynamic types

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

What does dynamic types mean?

A

the same variable can be used to hold different data types

EX: var x;               // Now x is undefined
var x = 5;           // Now x is a Number
var x = "John";      // Now x is a String
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a String?

A

text within JS

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

How is a string written in JS?

A

Strings are written with quotes. You can use single or double quotes

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