scrimba
The JavaScript Language [JSL] Module 4 (Control Flow)
Energy Drink Expressions
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Energy Drink Expressions
by
AboutCommentsNotes
Energy Drink Expressions
by
Expand for more info
solution.js
run
preview
console
// Exercise 1: Create a Numeric Literal Expression
let daysAvailable = 7;
console.log(`Number of days the special energy drink is available: ${daysAvailable}`);

// Exercise 2: Combine String Literals
let tagline = "Unleash" + " Your Potential!";
console.log(`Tagline for the new energy drink: "${tagline}"`);

// Exercise 3: Use Identifiers
let hydrationDrink = "Electrolyte+";
let energyDrink = "Caffeine Blast";
let comboDrink = hydrationDrink + " & " + energyDrink;
console.log(`Combined energy drink product: "${comboDrink}"`);

// Exercise 4: Experiment with Grouping Operators
let totalCost = (2 * 5) * 7;
console.log(`Total cost of buying energy drinks for a week: $${totalCost}`);
Console
/index.html
LIVE