Data Types Flashcards
1
Q
What type of data can javascript variable hold?
A
numbers, strings, objects and more
2
Q
What happens when you add a number to a string?
A
JavaScript will treat the number as a string
3
Q
How does JS evaluate an expression
A
from left to right
4
Q
What type are in JS?
A
dynamic types
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
6
Q
What is a String?
A
text within JS
7
Q
How is a string written in JS?
A
Strings are written with quotes. You can use single or double quotes