Variables
Goals
- Store data in variables
- Replace data in an existing variable
Step 1
Type this in the terminal:irb
Step 2
Type this in irb:my_variable = 5Type this in irb:another_variable = "hi"
Step 3
Type this in irb:my_variable = 10
Step 4
Type this in irb:apples = 5 bananas = 10 + 5 fruits = 2 + apples + bananas bananas = fruits - apples
Step 5
Explanation
Next Step:
Go on to Strings
Back to irb