Review after Mad Libs and Calculator
- Variable are names for values (like
x in algebra),
can be used again and again, and can change
- Assignment is different from equality.
var x = 13;
x = x + 1;
- Values in variables can be strings or numbers.
(We'll fine-tune this later!) "Float" is CS-speak for real numbers,
- There is a difference between
- We can build up a long string out of shorter strings (and even
- Periods inside strings represent periods in text.
Periods outside of strings are for referencing object properties and
- Spaces can be added to strings, but only if the space is
enclosed in quotation marks.
- A function is a group of statements that collectively do one
- A function call requires parentheses after the function
prompt functions expect
a single string in the parentheses.
parseFloat function converts a string
to a number (if the value of the string really does represent a