Programs get useful once they can change what they remember and work out new values. Here you'll reassign a stored value with let, calculate with arithmetic and parentheses, join text together to build a sentence, and finish by adopting template literals as the clean way to drop stored values straight into a message.
Overview
Syllabus
Changing a Stored Value with let
- Change a Value and Print It Twice
- Add to the Current Value
- Choose const or let
- Track a Day of Sales
Calculating with Arithmetic Operators
- Add and Subtract Inside console.log
- Calculate and Store a Total
- Control the Order with Parentheses
- Split the Bill
Joining Text with +
- Join Two Words
- Add the Missing Spaces
- Greet by Name
- Describe an Order from Three Values
Composing Messages with Template Literals
- Rewrite a Message as a Template Literal
- Embed Two Values in One Sentence
- Calculate Inside the Braces
- Print a Two-Line Receipt