Command Palette

Search for a command to run...

Hectal
Phase 1: Values, Types and Variables
JavaScript · Exercise 4 of 5 PreviousNext
Beginner

A birthday card with a template literal

Using the variables in the starter, show this exact text in the card: Happy birthday, Ravi! You are 30 today.

Build it with a template literal (backticks and ${ }), and work out the new age from age inside the template (don't type 30).

What Check tests

  1. The card shows the exact message
  2. The code uses a template literal with ${ }
  3. The age is calculated, not typed

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.