Variables Flashcards
What are Variables Types?
Numbers, Strings, Digits, underscores and dollar signs
Variables Names rule 1
Names must begin with a letter
Variables Names rule 2
Names can also begin with $ and _
Is JavaScript case sensitive?
Yes. Example: y and Y are different variables
Can reserved words be used
No. Example: (like JavaScript keywords) cannot be used as names
What is an Assignment Operator sign
equal sign (=)
what does the equal sign (=) mean?
“assignment” operator, not an “equal to” operator.
Does the equal sign (=) mean “equal to” operator.
No. it’s a assignment operator only
What can a variables hold?
Numbers and text
What is a String?
A text values
How is a string writing in javaScript?
Inside double “ “ or single quotes ‘ ‘
Can you place a number within a string?
Yes, but it will be treated as a text string not a number.
What is creating a Variable called?
“declaring” a variable.
How do you write a variable in JavaScript?
var name = 1 and/or name = 1
What is undefined?
The variable has no value