Assignment - Variables, Operators, Data Types
-
Create two variables: One that holds a fictional user input (a number of
your choice) and one that holds no value initially (e.g. "result").
-
Set the result variable to 18 plus the value stored in user input.
-
Add three additional lines of code where you change the result variable
again (by subtracting a value of your choice, multiplying it and
dividing it).
-
Think about the value stored in the user input variable you also created
- did that value change?
-
alert()
the result and the user input variables (in two
separate alert()
calls).